Skip to content

Instantly share code, notes, and snippets.

@zmnv
Created July 2, 2019 04:54
Show Gist options
  • Save zmnv/607dbf8428b6460f3bf052959a4b517d to your computer and use it in GitHub Desktop.
Save zmnv/607dbf8428b6460f3bf052959a4b517d to your computer and use it in GitHub Desktop.
проверка себя
/* eslint-disable */
console.log('start');
setTimeout(() => {
console.log('global setTimeout 0');
}, 0);
let i = 0;
Promise.resolve()
.then(() => {
console.log('Promise 1');
setTimeout(() => {
console.log('Promise 1 setTimeout 0');
}, 0);
})
.then(() => {
console.log('Promise 2');
while(i<9999999) {
i++;
}
setTimeout(() => {
console.log('Promise 2 setTimeout 0');
}, 0);
});
console.log('end');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment