I am looking for an easy way in JavaScript to check if a number has a decimal place in it (in order to determine if it is an integer).(我在JavaScript中寻找一种简单的方法来检查数字中是否有小数位(以确定它是否是整数)。)
For instance,(例如,)
23 -> OK
5 -> OK
3.5 -> not OK
34.345 -> not OK
if(number is integer) {...}
ask by Hans translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…