Wednesday, July 5, 2017

setTimeout(..., 0)

Question: What does the following code print?
console.log('one');
setTimeout(function() {
  console.log('two');
}, 0);
console.log('three');
@reference_1_github
A:
one
three
two

No comments:

Post a Comment