1.Null and Undefined
In javascript an undefined variable is a variable that never been declared or never assigned a value.
1 | var foo; |
If you assign foo = null. Then foo will be null which is a javascript object
1 | var foo; |
2.Confuse of working with “==” and “===”.
=== means strictly equal which will check both type and value.
Servral samples:
1 | null === null # => true |
3.What is false in javascript?
1 | if(!false) { |
Except these value, others could be regard as true.