Home / Programming MCQs / JavaScript MCQs / Question

P

Praveen Singh • 27.20K Points
Instructor II

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

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.