A

Admin • 833.24K Points
Coach

Q. Which of the following values will be returned by the last statement in the given code?

Code:
functionconstfun()
{
var fun =[];
for(vari=0;i<10;i++)
fun[i]=function(){returni;};
return fun;
}
var fun =constfun();
fun[5]()
  • (A) 10
  • (B) 12
  • (C) 8
  • (D) 9
  • Correct Answer - Option(C)
  • Views: 33
  • Filed under category JavaScript
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.