isnan in javascript
// Use isNaN()
// In javascript compare NaN direct alweys return false
let num1 = Number("Vishal");
// This code never work
if(num1 == NaN){ // Direct compare NaN alweys return false so use isNaN() function
....... Your Code .......
}
// This code work
if(isNaN(num1){
.........Your Code .......
}
function isNaN(x) {
return x !== x;
};
isNaN(NaN);//true var s = userInput[0];
if(isNaN(s) !== true)
{
console.log("yes");
}
else
{
console.log("no");
}
Also in JavaScript:
- display image base64 in REACT NATIVE
- input in javascript
- jquery add inline style
- array of array key value javascript
- npm numeral
- how to creat emmet in react
- google script get date without time
- .env file example react native
- javascript round down
- buscar valor maximo y mínimo array jquery
- check scroll top height in react js
- what does js stand for
- how to run a vue js hello world app in vue version 3
- javascript remove variable from array
- onclick go to url
- js variable to string
- vuex.esm.js
- javascript change button onclick
- js array modify element
- function redirect javascript
- heroku scripts
- export component in
- how to send multiple array in ajax
- angular get firebase firestore