Guest User

Untitled

a guest
May 21st, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. //Assignment Even or Odd
  2.  
  3. //Prompt the user to enter a number
  4. //Show a pop-up - "number is even/odd"
  5.  
  6. var value = parseInt(prompt("Enter a Number"));
  7. if(value % 2 == 0){
  8. alert(value + "is even");
  9. }else{
  10. alert(value + " is odd");
  11. }
Add Comment
Please, Sign In to add comment