
Object-Oriented JavaScript - Second Edition
By :

Let's quickly summarize some of the main points discussed so far:
There are five primitive data types in JavaScript:
Number
String
Boolean
Undefined
Null
Everything that is not a primitive data type is an object
The primitive number data type can store positive and negative integers or floats, hexadecimal numbers, octal numbers, exponents, and the special numbers NaN
, Infinity
, and –Infinity
The string data type contains characters in quotes
The only values of the Boolean data type are true
and false
The only value of the null data type is the value null
The only value of the undefined data type is the value undefined
All values become true
when converted to a Boolean, with the exception of the six falsy values:
""
null
undefined
0
NaN
false
Change the font size
Change margin width
Change background colour