js 区分整数和小数

function isInt(x) {
    return x % 1 === 0
} 

 

posted @ 2021-09-28 15:10  芬尼克斯  阅读(128)  评论(0编辑  收藏  举报