js check if positive integer code example
Example 1: javascript is number an integer
Number.isInteger(value)
//returns a Boolean
Example 2: find positive integers javascript
.filter(num => num > 0 && num % parseInt(num) === 0)
Number.isInteger(value)
//returns a Boolean
.filter(num => num > 0 && num % parseInt(num) === 0)