JS Coding Questions Logo
JS Coding Questions
#389💼 Interview

How do you implement zero timeout in modern browsers

Advertisement

728x90

You can't use setTimeout(fn, 0) to execute the code immediately due to minimum delay of greater than 0ms. But you can use window.postMessage() to achieve this behavior.

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 47

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
389of476