Methods of primitives Flashcards
1
Q
There are 7 primitive types:
A
string, number, bigint, boolean, symbol, null and undefined.
2
Q
alert( typeof 0 ); //
A
“number”
3
Q
alert( typeof new Number(0) ); //
A
“object”!
4
Q
Objects are always truthy in ____ statements
A
if
5
Q
let num = Number(“123”); // returns?
A
convert a string to number
6
Q
___ and ____ have no methods
A
null/undefined h