Advertisement
Guest User

a

a guest
Apr 18th, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. if (confirm("Are you old enough to read about beer\n" +
  2. "according to your local community standards?")) {
  3. for (i = 99 ; i > 0 ; i--) {
  4. j = i - 1;
  5. if (i != 1) {
  6. icase = "bottles";
  7. } else {
  8. icase = "bottle";
  9. }
  10. if (j != 1) {
  11. jcase = "bottles";
  12. } else {
  13. jcase = "bottle";
  14. }
  15. document.writeln(i + " " + icase + " of beer on the wall,");
  16. document.writeln(i + " " + icase + " of beer,");
  17. document.writeln("Take 1 down, pass it around,");
  18. if (j != 0) {
  19. document.writeln(j + " " + jcase + " of beer on the wall.");
  20. } else {
  21. document.writeln("No more bottles of beer on the wall!");
  22. }
  23. document.writeln()
  24. }
  25. } else {
  26. document.write("You might want think about moving to another community.")
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement