Boolean Flashcards
1
Q
Attributes
A
Primitive data type / immutable Contains methods #safe
2
Q
Instantiation
A
// literal true // constructor; if arg is truthy, true, else false Boolean(1) // primitive new Boolean(1) // object
3
Q
Methods (2)
A
.toString —string representation of boolean
.valueOf —return primitive value of boolean object