Is there or isn't there an integer type in JavaScript?

前端 未结 4 1491
南旧
南旧 2020-12-29 01:19

I am just starting to learn Javascript and I immediately got confused by seemingly contradictory statements in Mozilla\'s A re-introduction to JavaScript (JS tutorial).

4条回答
  •  没有蜡笔的小新
    2020-12-29 01:38

    I believe questioner has already found his/her answer. But for others like me, you can check number is integer or not in JavaScript by using Number.isInteger() method. MDN

提交回复
热议问题