Question #19

Author: admin
tags: JavaScript  
const promise = new Promise((resolve) => { resolve(); });

promise.then(() => console.log(1));
promise.then(() => console.log(2));
console.log(3);
What will the console output be?
1, 2, 3
1, 3
3, 1, 2
3, 1
3, 2, 1
2, 3
3
No output, an error will occur.
On the same promise, you can call the then() method as many times as you want.
The callbacks passed to .then() are called after processing the synchronous code.
Rate the difficulty of the question:
easyhard