Menu
This is a fragment from the book “Beginning Javacript 5th edition”.
Chapter 3.
[I]Look at an example in which you want to get the user’s age via a prompt box. You want to show the prompt box but also make sure that what the user has entered is a number:
[CODE]var userAge;
do {
userAge = prompt(“Please enter your age”,””)
} while (isNaN(userAge) == true);
I was wondering, what is the purpose of comparing [B]isNaN(userAge) [B]isNaN(userAge) [B]true
Thanks in advance!
Bruno.