I have a function to test if a prompt input is a number, like so:
function myFunction()
{
var person = prompt(Please enter your name, );
if (person != null)
{
if(isNaN(person))
{
document.write(hello + person + <br><br>);
}
else
document.write(You gave me a number);
}
else
{
document.write(You didn't answer.<br><br>);
}
}
but every time I enter a number it keeps outputting hello + the number. I've been googling this function for quite some time and it doesn't make sense to me, it seems like it should work. Why is person returning true?