微宏任务执行顺序比较,promise.then,process.nextTick, setTimeout 以及 setImmediate的执行顺序
先举一个比较典型的例子:setImmediate(function(){console.log(1);},0);setTimeout(function(){console.log(2);},0);newPromise(function(resolve){console.log(3);resolve();console.log(4);}).then(function(){console.log(5)