Consider the following JavaScript for loop: 

for (var i=0; i< 5; i++) { 
	setTimeout(() => console.log(i), 1000); 
}

What will be the output after 1 second?

0 1 2 3 4

0 1 2 3 4 5

undefined

5 5 5 5 5

Verified Answer
Correct Option - d

To get all Infosys Certified JavaScript Professional Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram