Perl and PHP most certainly do have integers. And as you said, Lua added them recently, because it makes sense to have integers. The question is why ECMA haven’t even tried to add integers to JavaScript. They’re already at ES6 and there are no signs of integers in ES7 or 8.

JavaScript arrays are used in a rather bizarre way. To add/remove elements at the end, you use push/pop. To add/remove elements at the beginning, you use unshift/shift. To insert/remove an element anywhere else, you use splice. This is completely counter to the way arrays are understood and used in most languages such as C, C#, Java, Python, Smalltalk, etc.

Strict mode doesn’t solve all your problems. Neither do linters. Sooner or later, something will catch you. And you’ll never know when. It’s like walking through a minefield.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store