View difference between Paste ID: 42mBkBhs and NtivPvb4
SHOW: | | - or go back to the newest paste.
1
var userAge = parseInt(prompt("I am the message! Number me: "), 10);
2
3-
if(userAge == isNaN()) {
3+
if(isNaN(userAge)) {
4
    console.log("Not a number!");
5
}
6
7
else if(userAge >= 18) {
8
    console.log("Too young! Yuck!");
9
}
10
11
else {
12
    console.log("Welcome treehugger!");
13
}