0 votes
in JavaScript by
In which events/scenarios, A function name gets optional in JavaScript?

a) When a function is defined as a looping statement

b) When the function is called

c) When a function is defined as expressions

d) When the function is predefined

1 Answer

0 votes
by

Answer: C

Reason: A function name becomes optional when it is defined as an "Expression". For Example

Program

var s = function (a, b) {return a * b};

After a function has been stored in a variable, we can use that variable as a function

var s = function (a, b) {return a * b};
var t = s(4, 3);
...