adplus-dvertising
frame-decoration

Question

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

Posted under JavaScript

Answer: (a).Yes, perfectly

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

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