Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if input is a number javascript

// Another option is typeof which return a string
if (typeof(val) === 'number') {
	// Guess what, it's a bloody number!
}
 
PREVIOUS NEXT
Tagged: #check #input #number #javascript
ADD COMMENT
Topic
Name
2+2 =