两种方法:

Math.round(n) == n //if true, then 是整数 否则不是
n % 1 == 0 //if true, then 是整数 否则不是