4.4 Literals
Literals are typed as follows:
- The type of the
null
literal is the Null primitive type. - The type of the literals
true
andfalse
is the Boolean primitive type. - The type of numeric literals is the Number primitive type.
- The type of string literals is the String primitive type.
- The type of regular expression literals is the global interface type ‘RegExp’.