Answers for "how to check if a number is float javascript"

0

how to check if a number is float javascript

function isInt(n){
    return Number(n) === n && n % 1 === 0;
}

function isFloat(n){
    return Number(n) === n && n % 1 !== 0;
}
Posted by: Guest on June-02-2021

Code answers related to "how to check if a number is float javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language