Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a0e16ccd5e
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (23 sloc) 0.313 kb
**question
What is the result of the following code?
**question
**code
function timeoutLoop() {
for(var it = 0; it < 2; it++)
{
setTimeout(function() {
console.log(it);
}, 1);
}
}
timeoutLoop();
**code
**possibleAnswers
0, 1
1, 2
2, 2
2, 3
**possibleAnswers
**correctIndex
2
**correctIndex
Jump to Line
Something went wrong with that request. Please try again.