DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
how to know if a number has a decimal number js
function hasDecimal (num) { return !!(num % 1); } hasDecimal(2) // true hasDecimal(2.345) // false
PREVIOUS
NEXT
Tagged:
#number
#decimal
#number
#js
ADD COMMENT
Topic
COMMENT
Name
2+7 =
Submit