Q
What does the 'return' keyword do in JavaScript?

Answer & Solution

Answer: Option C
Solution:
The 'return' keyword is used to exit a function and specify the value to be returned to the caller.
Related Questions on Average

Which keyword is used to remove a property from an object?

A). delete

B). remove

C). erase

D). discard

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

A). new

B). instanceof

C). this

D). create

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

A). number

B). string

C). object

D). undefined

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

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

Which keyword is used to declare constants in JavaScript?

A). const

B). let

C). var

D). constant

Which keyword is used to declare variables in JavaScript?

A). var

B). let

C). const

D). variable

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 'if' keyword in JavaScript?

A). To perform conditional execution

B). To declare functions

C). To create loops

D). To skip iterations in a loop