Q
What is the purpose of the 'instanceof' keyword in JavaScript?

Answer & Solution

Answer: Option A
Solution:
The 'instanceof' keyword is used to determine if an object is an instance of a particular class or constructor.
Related Questions on Average

What does the 'typeof' keyword return for a number?

A). number

B). string

C). object

D). undefined

Which keyword is used to determine the type of a variable or an expression?

A). typeof

B). type

C). typeOf

D). instanceof

Which keyword is used to create a new instance of an object?

A). new

B). instanceof

C). this

D). create

Which keyword is used to create a loop with multiple cases in JavaScript?

A). switch

B). for

C). while

D). if

What is the purpose of the 'let' keyword in JavaScript?

A). To declare constants

B). To declare block-scoped variables

C). To declare functions

D). To perform logical operations

What does the 'break' keyword do in JavaScript?

A). Exits a loop or switch statement

B). Continues to the next iteration in a loop

C). Returns a value from a function

D). Skips the current iteration in a loop

What does the 'return' keyword do in JavaScript?

A). Exits a loop or switch statement

B). Continues to the next iteration in a loop

C). Returns a value from a function

D). Skips the current iteration in a loop

Which keyword is used to declare constants in JavaScript?

A). const

B). let

C). var

D). constant

Which keyword is used to skip the current iteration in a loop?

A). continue

B). break

C). return

D). exit

Which keyword is used to create an instance of an array in JavaScript?

A). new

B). instanceof

C). this

D). create