JS Built-ins
AsyncPatternsintermediate

.then returns a new Promise

πŸ“– Usage Example
const p = Promise.resolve(1).then(v => v + 1);
// p is a new Promise resolving to 2

.then() returns a new Promise β€” the original is unchanged.

Promise.then()

.then() returns a new Promise.

Challenge: Verify that .then() returns a Promise instance.

πŸ’‘ Hints (2)
  • β€’ .then() always returns a new Promise.
  • β€’ The returned Promise may have a different state than the original.