3 ms·
// bad const item = new Object(); // good const item = {}; Literally useless differentiation.
by joeblow99 11y ago
// bad
const item = new Object();
// good
const item = {};
Literally useless differentiation.
- razwall 11y agoSeems pretty useful to me. If I see "new Object()", I know the code was written by someone who doesn't know JS very well, so I should look more carefully for bugs.
- roelvanhintum 11y agoSame functionality, less characters. This also helps being consistent.
- Ronsenshi 11y agoThat's why they call it Style Guide. You know - Style?
- jeffpeterson 11y agoHah, "literally"