Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> Seuss Writer </title>
- <script language= "javascript">
- var askFornoun = true;
- var askForcolor = true;
- var colorList = [];
- var nounList = [];
- while (askForcolor) {
- colorList.push(prompt("List out your favorite color (Type 'stop' to move on)"));
- if () {
- askForcolor = false;
- else if (!isNaN(colorList)) {
- alert("That is not a color. Try again.");
- }
- }
- }
- while (askFornoun) {
- nounList.push(prompt("List out your favorite noun (Type 'stop to move on)"));
- if (/*Make a detection of user typing stop in the prompt it will stop and move on*/) {
- askFornoun = false;
- }
- }
- var colorLength = colorList.length;
- for (i=0; i<colorLength; i++) {
- for (j=0; j<colorLength; j++) {
- document.write(colorList[i] + nounList[j] + " ");
- }
- document.write("<br>");
- }
- document.write("<h1>Thank you for using my <font color='red'>AWESOME</font>, Times Table Write. </h1>");
- </script>
- </head>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement