setInterval(function(){console.log("hello")},2000);
while(true){}
"hello" never gets printed.
I think event loop runs in a different thread, but here it seems like 'while loop' is preventing the 'event loop' from execution. Can somebody put some light on this?