Hacker News new | past | comments | ask | show | jobs | submit login

The first few lines are misleading - Javascript doesn't really have an integer type. At least for Ecmascript 5 http://www.ecma-international.org/publications/files/ECMA-ST... both integers and floats are stored as IEEE floats and the type is called Number. "Small enough" integers are stored exactly so this works well enough in practice.

(Despite this, it does have some functions for converting and parsing integral values.)

Ecmascript 4 (abandoned) had some support for an Integer type (it was a kind-of pseudo-type mess where the value of a Number was checked to see if it was an integer or not).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: