Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

has decimal javascript

// check if num has decimal value.

num % 1 !== 0
// if any number on right of decimal other than 0, returns true

// Eg
5   % 1 !== 0 // false
5.0 % 1 !== 0 // false
5.1 % 1 !== 0 // true
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #decimal #javascript
ADD COMMENT
Topic
Name
3+1 =