Hacker News new | ask | show | jobs
by hajile 1867 days ago
If your statement begins with a curly brace, that brace is a code block, NOT an object literal.

Coercion rules are terrible, but they were only added to the language due to developer demands.

If you worry about zero or empty string, you’ll have problems in tons of other languages. Null vs undefined is less understandable along with the old ability to redefine undefined as it was a variable . In any case, I agree that one of the two shouldn’t exist.