Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <html>
  2.  
  3. <head>
  4. <title> Seuss Writer </title>
  5. <script language= "javascript">
  6.  
  7. var askFornoun = true;
  8. var askForcolor = true;
  9. var colorList = [];
  10. var nounList = [];
  11.  
  12. while (askForcolor) {
  13. colorList.push(prompt("List out your favorite color (Type 'stop' to move on)"));
  14. if () {
  15. askForcolor = false;
  16. else if (!isNaN(colorList)) {
  17. alert("That is not a color. Try again.");
  18. }
  19. }
  20. }
  21.  
  22. while (askFornoun) {
  23. nounList.push(prompt("List out your favorite noun (Type 'stop to move on)"));
  24. if (/*Make a detection of user typing stop in the prompt it will stop and move on*/) {
  25. askFornoun = false;
  26. }
  27. }
  28.  
  29. var colorLength = colorList.length;
  30.  
  31.  
  32. for (i=0; i<colorLength; i++) {
  33. for (j=0; j<colorLength; j++) {
  34. document.write(colorList[i] + nounList[j] + "&nbsp;");
  35. }
  36.  
  37.  
  38. document.write("<br>");
  39. }
  40.  
  41. document.write("<h1>Thank you for using my <font color='red'>AWESOME</font>, Times Table Write. </h1>");
  42.  
  43. </script>
  44. </head>
  45.  
  46. <body>
  47. </body>
  48.  
  49. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement