7 Tips to Handle Undefined in JavaScript
When I started to learn JavaScript about eight years ago, I found bizarre that both undefined and null represent empty values.
Most of the modern languages like Ruby, Python or Java have a single null value (nil or null), which seems a reasonable approach.
But JavaScript is different.
The JavaScript interpreter returns undefined when accessing a variable or object property that is not yet initialized.

#javascript #undefined #programming

7 Tips to Handle Undefined in JavaScript
1.60 GEEK