They both represent a empty value.
Difference nr 1!
When you define a variable but not assign a value to it, it automatically puts a pl...
For further actions, you may consider blocking this person and/or reporting abuse
And this is why no one will ever fully understand JavaScript 😆
Even taken from MDN:
And when you click through to primitive values, MDN states:
Yet,
typeof null // object
🤔What the what 🤯
The new optional parameter for ES6 only cares about
undefined
.Wouldn't it be simpler to use
undefined
instead ofnull
everywhere? Just stop usingnull
?Yeah, this has tripped me a couple of times...
I like to think of undefined as the void personified.
Sometimes it can be really confusing. Thanks for the explanation
Yeah, JavaScript is a weird programming language but a nice one.
Indeed :)
Cool, thx for adding this up !