function nextTick(cb) { return Promise.resolve(null).then(cb) } nextTick(()=>console.log('next')) console.log('current')