Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. let firstRandom = Math.round((Math.random()*8+1));
  2. let lastRandom = Math.round((Math.random()*8+1));
  3. let question = parseInt(prompt('what is '+ firstRandom + '*' +
  4. lastRandom));
  5. if(question === firstRandom * lastRandom) {
  6. alert("You are correct!");
  7. } else {
  8. alert("You are wrong");
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement