When I execute the below code in the console I am getting as:
1,4, undefined 3,2.
I would like to know why its not executing as 1,3,4 and 2
since in setTimeout(function(){console.log(3)}, 0); the milliseconds param is 0.
(function() {
   console.log(1); 
   setTimeout(function(){console.log(2)}, 1000); 
   setTimeout(function(){console.log(3)}, 0); 
   console.log(4);
})();
 
     
     
    