Article Introduction: The main purpose of our null reference here is to say that if we define a variable that will be used to store the object in the future, then we'd better initialize the variable to null, so as long as it detects null value to see if the variable has already saved a reference to an object. |
A null type is the second data type with only one value, its value is null, and the null value represents an empty object pointer, so it is an object to detect null using the TypeOf operator. Element
Font |
Font-family |
|
Font-size |
|
Font-style |
|
Font-variant |
|
Font-weight |
|
Letter-spacing |
|
Line-height |
|
Text-decoration |
|
Text-align |
|
Text-indent |
|
Text-transform |
|
White-space |
|
Word-spacing |
|
Color |
|
Background |
Bg-attachment |
|
Bg-color |
|
Bg-image |
|
Bg-position |
|
Bg-repeat |
|
Box |
Width |
|
Height |
|
Border-top |
|
Border-right |
|
Border-bottom |
|
Border-left |
|
Margin |
|
Padding |
|
Max-height |
|
Min-height |
|
Max-width |
|
Min-width |
|
Outline-color |
|
Outline-style |
|
Outline-width |
|
Positioning |
Position |
|
Top |
|
Bottom |
|
Right |
|
Left |
|
Float |
|
Display |
|
Clear |
|
Z-index |
|
List |
List-style-image |
|
List-style-type |
|
List-style-position |
|
Table |
Vertical-align |
|
Border-collapse |
|
Border-spacing |
|
Caption-side |
|
Empty-cells |
|
Table-layout |
|
Effects |
Text-shadow |
|
-webkit-box-shadow |
|
Border-radius |
|
Other |
Overflow |
|
Cursor |
|
Visibility |
|
The main purpose of our null reference here is to say, if we define a variable that will be used to store the object in the future, then we'd better initialize the variable to null, so that it's possible to know whether the variable has saved a reference to an object as long as it detects a null value. var car = null; if (car!= null) {}