[Javascript] advanced programming data types with typeof

Data Type: undefined, null , boolean, String, Number The, complex data types, object total of six

typeof:undefined、object、boolean、string、number、function  六种

the console.log ( typeof  null ); // Object null value indicates a null object pointer

 undefined main purpose is for comparison. Variables can distinguish empty object uninitialized pointer.

var message;
console.log(message);  //undefined
console.log(age);   //错误

console.log(typeof message);  //undefined;
console.log(typeof age);  //undefined;

 

console.log(null == undefined); //true

// undefined null value is derived from the value of

Reproduced in: https: //www.cnblogs.com/positive/p/3731495.html

Guess you like

Origin blog.csdn.net/weixin_34008805/article/details/93495804