A

Admin • 833.24K Points
Coach

Q. What will be the output of the following code snippet?

Code:
(function(){
setTimeout(()=> console.log(1),2000);
console.log(2);
setTimeout(()=> console.log(3),0);
console.log(4);
})();
  • (A) 1 2 3 4
  • (B) 2 3 4 1
  • (C) 2 4 3 1
  • (D) 4 3 2 1
  • Correct Answer - Option(C)
  • Views: 22
  • Filed under category JavaScript
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.