FAQ: Variables - typeof operator

This is a limitation in JavaScript, if we look at the documentation (link) we can see:

there is only number, no distinction between integers and floats. So far I know, JavaScript is the only language I worked in which doesn’t distinguish integer and float.

Albeit we do have parsing tools that can differentiate between the two…

parseInt()

parseFloat()

although they return one or the other, not distinguish them as such.