First, the basic type of presentation
It can be determined by what type of typeof.
number includes basic digital, Infinity, unInfinity, NaN. Wherein NaN rather special, can not be done in one operation, when do you get a result NaN operation, for example, 1 * 'abc'.
Almost all of the string type of language has, but the implementation is different.
boolean is very common base type, only two values true and false.
null is actually empty
undefined undefined refers
Second, the type conversion
Some say in the type conversion error-prone place.
Any variable can be converted to a Boolean value, not true is false. Common empty string '', undefined, null, NaN, 0 can be converted to false. Others are all true.
When we define the variable, often we do var a = a || 10. We want to do is, if a is defined using a value is not defined but often ignored assigned to 10. If a value of zero. Therefore, this definition method must be used with caution.
Third, the summary