JavaScript Professional — Hard
Key points
- The Promise is resolved with the current value of x, which is 1.
- The value of x is changed to 2 after the Promise is resolved.
- The then() method logs the resolved value and the current value of x.
Ready to go further?
Related questions
