Vidyalelo
JavaScript · Q13

Array And Function

Programming · JavaScript · question 13

Q13

When does the function name become optional in JavaScript?

A.
When the function is defined as a looping statement
B.
When the function is defined as expressions
Answer
C.
When the function is predefined
D.
All of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
The function name is optional for functions defined as expressions. A function declaration statement actually declares a variable and assigns a function object to it.