Global Object Flashcards
1
Q
Name all global object properties (4 properties)
A
Infinity
NaN
undefined
globalThis
2
Q
Name all global object functions (1 + 4 number methods + 4 encode decode URI)
A
eval()
isFinite()
isNaN()
parseFloat()
parseInt()
encodeURI()
encodeURIComponent()
decodeURI()
decodeURIComponent()
3
Q
What does globalThis refer to?
A
the global object
Window in browser
Global Object in node and vs code
4
Q
All global object properties can be accessed on their own: alert("Hello"); vs window.alert("Hello"); t or f
A
t
5
Q
When you write var: var gVar = 5; Where is it actually placing the variable?
A
As a property on the global object
alert(window.gVar); // 5
global functions and variables declared with var (not let/const!) become the property of the global object:
6
Q
var gVar = 5;
is not the same as
global.gVar = 5
t or f
A
f