Caroline Louw12,155 Points
How does the program know that the highNumber variable is a number and execute the first if statement?
And if not the else statement is executed?
Steve Fau5,621 Points
This got me for a sec too, but here's the solution:
Before he goes to the if statement, he's parsing the number from the user input via the parseInt() method.
The user either enters something that can be parsed into a number, or the parseInt() method returns NaN, which then evaluates to false.
Read more about why NaN evaluates to false and other falsy values here: https://developer.mozilla.org/en-US/docs/Glossary/Falsy
Skyler HarrisFront End Web Development Techdegree Student 6,517 Points
Nice answer Steve that made a lot of sense!