Y
Hacker News
new
|
ask
|
show
|
jobs
by
kevincennis
3994 days ago
In ES5+, the global `undefined` is immutable, so it should be pretty safe unless someone declared a local `undefined` var in an outer scope.
1 comments
arnehormann
3994 days ago
I use "var undef;" at the top of a function and never set it to a value. Comparison with === is the same as with undefined. And it's nice for minification.
link