OKyJIucT
5/18/2016 - 8:18 AM

isInt() isFloat()

isInt()

isFloat()

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

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