Q: 9
Refer to the code below:
01 let total = 10;
02 const interval = setInterval(() => {
03 total++;
04 clearInterval(interval);
05 total++;
06 }, 0);
07 total++;
08 console.log(total);
Considering that JavaScript is single-threaded, what is the output of line 08 after the code executes?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.