Last active
January 26, 2021 17:30
-
-
Save Sanchithasharma/b50f54f34b605c21d254681021ea8709 to your computer and use it in GitHub Desktop.
Check if a variable is Number or not using isNan()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var numberOfpushUpsToday = 34; | |
if(!isNaN(numberOfpushUpsToday)){ | |
console.log('It is a number') | |
} | |
else { | |
console.log('It is not a number') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment