2 ms·
"The new keyword was added to the language partially to appease classical languages, but in reality it tends to confuse developers more than help them. Instead,
by hifier 13y ago
"The new keyword was added to the language partially to appease classical languages, but in reality it tends to confuse developers more than help them. Instead, there are native ways in JavaScript to declare objects and arrays and you should use those instead."
Umm... what? Ever heard of constructor functions and prototypes?
...to be fair there is a small note on this at the end of the article, but this concept in javascript is far from secondary. It deserves more than a footnote. 'new' is not something to be avoided as implied here.