It overlooked a small knowledge

1, undefined value is a value derived from null  (undefined == null); // true
  null and undefined means "vacant value"

ECMAScript undefined is introduced in the third edition, null pointer in order to distinguish objects and uninitialized variables, which is a predefined global variables.
Function returns no return value is undefined.
No parameter arguments are undefined.
When a declare a variable uninitialized, get it is undefined.

2, Boolean Boolean () is false converted has the following six kinds :
1)false
2) "" (the empty string)
3) 0
4) of
5) null
6) undefined



3, Number Conversion
1. If the string is purely digital, it is directly converted into digital
2. If the content of non-numeric string, is converted to // NaN3 Number The ( "123aaa") // NaN3
3. If the string is a null string is a space or a full string, then converted to 0 //, "", "" // 0

4.Number(true) //1 Number(false) //0

5.Number(null) //0

6. Number(undefined) //NaN

7, isNaN (): whether the detected non-numeric

4, NaN == NaN ; // false NaN and who are not equal, including its own

Guess you like

Origin www.cnblogs.com/zjz666/p/11425174.html