rony2605

If e else - Idade maior ou igual

Mar 1st, 2013
188
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Check if the user is ready to play!
  2. confirm("Are you ready?");
  3. var age = prompt("What's your age?");
  4. if(age >= 18)
  5. {
  6. console.log("Play on!");
  7. }
  8. else
  9. {
  10. console.log("You must be 13 or older to play!");
  11. }
RAW Paste Data