3 ms·
This new feature allows you to make code more structured and maintainable. Of course people are going to use it, and even change old code to use it. `Array.forE
by pitaj 10y ago
This new feature allows you to make code more structured and maintainable. Of course people are going to use it, and even change old code to use it. `Array.forEach` and `Object.keys` were new features in
ES5, should people just leave their old `for` loops anyways? Refactoring old code is a good way to keep your codebase consistent and maintainable.
- daliwali 10y agoHahaha, no. Every time the argument for "maintainability", or some other subjective quality like "readability" is mentioned, another question must be answered "to who?" The class keyword was added a few years too late to accomodate the horde of desktop Java/.NET developers moving to the web platform, who simply did not grok prototypal inheritance. Now they don't have to. >`Array.forEach` and `Object.keys` were new features in ES5, should people just leave their old `for` loops anyways? Emphatic yes, people should keep using their "old" loops. They do less and are much faster.
- deleted 10y ago[deleted]