Q
What does typeof document return in a web browser environment?

Answer & Solution

Answer: Option B
Solution:
In a web browser, document refers to the Document object, so typeof returns 'object'.
Related Questions on Average

What is the result of typeof document.getElementById('example')?

A). element

B). object

C). function

D). undefined

What is the result of typeof 'hello'?

A). string

B). object

C). undefined

D). number

What does typeof Symbol('id') return?

A). symbol

B). string

C). object

D). undefined

What is the result of typeof undefined?

A). undefined

B). object

C). string

D). number

What is the result of typeof null?

A). null

B). undefined

C). object

D). number

What is the result of typeof NaN?

A). number

B). NaN

C). undefined

D). object

What is the result of typeof new SyntaxError('syntax error')?

A). syntaxerror

B). object

C). function

D). undefined

What is the result of typeof window in a web browser environment?

A). window

B). object

C). function

D). undefined

What is the result of typeof [1, 2, 3]?

A). array

B). object

C). list

D). undefined

What does typeof true return?

A). number

B). boolean

C). undefined

D). object