Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // #Promise Order 1
- console.log(1)
- const promise = new Promise((resolve) => {
- console.log(2)
- resolve()
- console.log(3)
- })
- console.log(4)
- promise.then(() => {
- console.log(5)
- }).then(() => {
- console.log(6)
- })
- console.log(7)
- setTimeout(() => {
- console.log(8)
- }, 10)
- setTimeout(() => {
- console.log(9)
- }, 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement