4 ms·
Do any of these changes make the language objectively better? All I see are nice-to-haves that aren't really required.
by rocky1138 10y ago
Do any of these changes make the language objectively better? All I see are nice-to-haves that aren't really required.
- dandersh 10y agoI think the Array.includes makes the language better as it standardizes how to check for array membership. I've encountered more than one bug as a result of the "!== -1" check not working correctly/as expected.
- mrspeaker 10y agoI've always had a soft-spot for JavaScript, and have written a tonne of it over the years - all these "nice-to-haves" are really nice to have. I find it a lot more fun to write and, more importantly, easier to read six months later (assuming people don't try to be overly tricky with it: I'm looking at you, nested-destructed function parameters!)
- pas 10y agoWell, realistically, if you want an objectively better JS, use TS. It's completely opt-in, transpiles/compiles to JS, and you can finally maintain projects with more than 1 JS file in them, and no longer have to rage-delete the whole scripts.js file when - after adding the 66th god forsaken jQuery lib - something blows up the whole damn thing and all you're left with is a ridiculous error deep from within an unrelated library.
- dwaltrip 10y ago`Object.entries` and `Object.values` are huge wins in my book. Makes common looping operations less obtuse and obfuscated.