Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- console.log('script start');
- requestAnimationFrame(()=> {
- console.log("requestanimationframe");
- })
- const interval = setInterval(() => {
- console.log('setInterval')
- }, 0)
- setTimeout(function () {
- console.log('setTimeout 1');
- }, 0);
- Promise.resolve().then(function () {
- console.log('promise1');
- }).then(function () {
- setTimeout(() => {
- console.log('setTimeout 2')
- Promise.resolve().then(() => {
- console.log('promise 2')
- }).then(() => {
- console.log('promise 3')
- }).then(() => {
- clearInterval(interval)
- })
- }, 0)
- });
- setTimeout(function () {
- console.log('setTimeout 3');
- }, 0);
- Promise.resolve().then(function () {
- console.log('promise4');
- }).then(function () {
- console.log('promise5');
- });
- console.log('script end');
Add Comment
Please, Sign In to add comment