Y
Hacker News
new
|
ask
|
show
|
jobs
by
joeblow99
4008 days ago
// bad const item = new Object();
// good const item = {};
Literally useless differentiation.
4 comments
razwall
4008 days ago
Seems 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.
link
Ronsenshi
4008 days ago
That's why they call it Style Guide. You know - Style?
link
roelvanhintum
4008 days ago
Same functionality, less characters. This also helps being consistent.
link
jeffpeterson
4008 days ago
Hah, "literally"
link