What does "isNaN" function do in Java Script? [Resolved]

Posted by Programmer123 under JavaScript on 9/24/2013 | Points: 10 | Views : 4305 | Status : [Member] | Replies : 5
What does "isNaN" function do in Java Script?

Responses

Posted by: Murugavelmsc on: 9/25/2013 [Member] Starter | Points: 50
 0 The isNaN() function determines whether a value is an illegal number (Not-a-Number).This function returns true if the value is NaN, and false if not.Eg: Output:falsefalsefalsefalsetruetrue Regards, Murugavel S murugavel.sadagopan@gmail.com http://murugavelmsc.blogspot.in/Programmer123, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: Bandi on: 9/25/2013 [Member] [MVP] Platinum | Points: 25
 0 *. The isNaN() function determines whether a value is an illegal number (Not-a-Number).*. Evaluates an argument to determine if it is not a number.Syntax :-`isNaN(value)value = The value you want to evaluate.` Sample:`isNaN Fnction
Phone: ` To check that a number is NaN in JavaScript: `isNaN(parseFloat("VariableName"))` If VariableName is float/int then returns true; else falseMark This Response as Answer -- Chandu http://www.dotnetfunda.com/images/dnfmvp.gifProgrammer123, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: Bandi on: 9/25/2013 [Member] [MVP] Platinum | Points: 25
 0 isNaN Function Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).`isNaN(numValue) ` Return Value: true if the value converted to the Number type is the NaN, otherwise false.Points: 1) The required numValue is the value to be tested against NaN.2) You typically use this method to test return values from the parseInt and parseFloat methods.3) Alternatively, a variable that contains NaN or another value could be compared to itself. If it compares as unequal, it is NaN. This is because NaN is the only value that is not equal to itself.Examples: `// Returns false.isNaN(100);// Returns false.isNaN("100");// Returns true.isNaN("ABC");// Returns true.isNaN("10C");// Returns true.isNaN("abc123");// Returns true.isNaN(Math.sqrt(-1));` Mark This Response as Answer -- Chandu http://www.dotnetfunda.com/images/dnfmvp.gifProgrammer123, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: Allemahesh on: 9/25/2013 [Member] [MVP] Silver | Points: 25
 0 It returns true if the argument is not a number.B]Example: CODE]document.write(isNaN("Hello")+ "
");document.write(isNaN("2013/06/23")+ "
");document.write(isNaN(123)+ "
");OutPut:-truetruefalse Happy Coding,If it helps you or directs U towards the solution, MARK IT AS ANSWERProgrammer123, if this helps please login to Mark As Answer. | Alert Moderator
Posted by: aswinialuri-19361 on: 9/25/2013 [Member] Starter | Points: 25
 0 hi,NaNfunction-Not a number or illegal number`` Mark as Answer if it helps you Thanks&Regards Aswini AluriProgrammer123, if this helps please login to Mark As Answer. | Alert Moderator
Latest Posts