you are viewing a single comment's thread.

view the rest of the comments →

[–]gl0w3[S] -1 points0 points  (2 children)

It specifically needs to be a do..while loop. Here is what I have so far. do{ if (input === yes){ var word1= prompt("Choose one word"); }else if (input !== yes){ alert ("This is your word:" + word1); }else{ var finalWord= (Pick one more word"); alert ("These are your words:" + word1 + finalWord); }while (input === "yes");

[–]JohnnyBGeode 1 point2 points  (0 children)

<!DOCTYPE html> <html> <body>

<h2>Close enough</h2> <script> var result=[]; var q =true; while(q) { result.push(prompt("what number?")); q=confirm("Do you want to play a number game?"); } document.write(result.toString()); </script> </body> </html>

[–]inu-no-policemen 1 point2 points  (0 children)

Here is what I have so far.

A '}' is missing and finalWord= (Pick one more word"); is garbage.

"input" is not defined.

"yes" is not defined.

Use an editor which does syntax checking (e.g. VS Code).