Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

!isNAN

Status
Not open for further replies.

2ofaKind

Programmer
Jun 27, 2012
1
NL
hello,
I'm trying to find an explanation about the function !isNaN.
So my question is what does it do and how does it work in a source code?

Thank you in advance for the help
 
isNaN checks to see if a value is NOT a number. So [red]![/red]isNaN would be the inverse of that, checking to see if the value [red]IS[/red] a number.

Code:
var myvalue=567;

if(!isNaN(myvalue))
{
  alert('It is a number');
}

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top