Which of the following values will be returned by the last statement in the given code?
Which of the following values will be returned by the last statement in the given 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
|
Bookmarks