// ES6
Number.isInteger(num);
// ES5
if (!Number.isInteger) {
Number.isInteger = function(num) {
return typeof num == "number" && num % 1 == 0;
};
}
Js判断一个数为整数
猜你喜欢
转载自blog.csdn.net/m0_37686205/article/details/89309723
今日推荐
周排行