Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var userAge = parseInt(prompt("I am the message! Number me: "), 10);
- if(isNaN(userAge)) {
- console.log("Not a number!");
- }
- else if(userAge >= 18) {
- console.log("Too young! Yuck!");
- }
- else {
- console.log("Welcome treehugger!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement