Examveda
Examveda

Consider the following code snippet :
var tensquared = (function(x) {return x*x;}(10));
Will the above code work ?

A. Yes, perfectly

B. Error

C. Exception will be thrown

D. Memory leak

Answer: Option A

Solution(By Examveda Team)

Function name is optional for functions defined as expressions. Function expressions are sometimes defined and immediately invoked.

This Question Belongs to Javascript >> Array And Function

Join The Discussion

Related Questions on Array and Function