There are many explanations on the internet about null and undefined, so today we will briefly talk about the topic of null and undefined, in order to solve their mystery, of course, this is a simple introduction, in the future there are corresponding updates.
Why undefined is equal to null when using = =
If you know that JavaScript has an implicit conversion, then I think you should know what's going on, and when comparing undefined with null, undefined will be converted to False,null also Fasle, if NULL is converted to a number, Null is 0, of course this is not the point of this chapter to say. Then say null and undefined, because two are converted to false nature is equal, if it is = = = that is not the same, because = = = is not the implicit conversion (that is, type conversion), since the conversion is not done, then undefined will not be equal to NULL.
The difference between undefined and null: 1
1 Number (undefined) 2 NaN3 number (NULL) 4 0
Say this today, sometimes we continue to talk, if you have more understanding, you can give me a reply.
About the things that are null and undefined.