Advertisement
coinman001

number geussing game

Oct 24th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. // starting this not done
  2.  
  3.  
  4. min = 1
  5. max = 100
  6. answer = Math.floor(Math.random()*(max-min)+min);
  7. question = prompt("choose a number (interger)");
  8. if (question == answer) {
  9. alert(" you guessed correctly")
  10. } elseif { (question > answer) ;
  11. alert("you answered too big!")
  12. } elseif { (question < answer);
  13. alert("you answered too small!");
  14. } else { (question == string)
  15. alert("stop trying to troll noob");
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement