I have always thought that “” === null. But this question says there are 5 falsy values, i.e.
undefined , and
NaN . Hence, I am wondering if there if there might be difference between the two
In JS, all strings are objects, even an empty one. However null is not an object (it is the absence of an object)
Did you know that…
null is a special keyword, and it’s a datatype on its own. It rapresents values that are not present on purpose.
"" is an empty string, a string containing 0 characters
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.