JavaScript > Random > Beginner Next/Skip this question

What would be the final value of variable output?

var output = "";
function print(d)
{
 output = output + d.toString();
}

for(var i = 0 ; i < 2; i++)
{
 setTimeout(function() { print(i) },5000);
}
Answers :
Explaination :
social share share on facebook share on twitter share on google plus share on linkedin
Add Comments :

Login

Register

Next Question