"1. Boolean corresponding to the value"
False Boolean value false object null number NaN (not a number) digit 0 initial value undefined null string "" True string "0" or other No more than six kinds of values
"2. Null differs from undefined "
Null is a given empty object or array undefined is a variable initializer that is declared or undeclared but not assigned, so it is not possible to use the Var declaration undefined The value of all variables that have no initial value is undefined
"3. The type of the detection variable "
var A; typeof (a); undefined var a = "0"; typeof (a); string var a = 0; typeof (a); number var a = null, b = new Array, typeof (a),//object typeof (b),//object var a= function () { alert (12 ); } typeof (A); function
"NOTE:" All variables must be declared using VAR before they are used
Detects if a variable exists if (typeof (Somevar)!== "undefined") { //exist coding here ...}
"4. The maximum value in JS "
var maxnumber = Infinity; Note Infinity is a built-in constant var minnumber =-infinity; Minimum number of JS negative numbers
JS Object-Oriented learning Note VI (variable)