In js, null, '', undefined distinction

There are three values ​​may represent false "" in the js, null, undefined

So in the end the difference between what they do

First we look at these three types of worth

"" Represents a string of characters no

initializing a null or empty object node represents an element of a node element does not exist

null and undefined values ​​are equal, but different types of

 

It indicates that only double equal sign ratio, the ratio of three equal number surpasses both types, can be seen from the above FIG their type is not equal to an undefined one object

 

Guess you like

Origin www.cnblogs.com/tffan/p/11425123.html
Recommended