Check if number is whole number

i would like to know how can i know if the result of a variable is a whole number or not.
like…
var i++;
if(i =wholenumber) {

}

i need something like this. the number must be a whole number with no decimals or fractions
thanks