Check if a Float value is equivalent to an Integer value | Function to check if N is equivalent to an integer ; Convert float value of N to integer ; If N is not equivalent to any integer ; driver function
function isInteger ( N ) { let X = Math . floor ( N ) ; let temp2 = N - X ; if ( temp2 > 0 ) { return false ; } return true ; } let N = 1.5 ; if ( isInteger ( N ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }