The .then() method takes a callback that runs when the promise fulfills. It receives the resolved value.
fetchUser(1)
.then(user => {
console.log(user.name);
return user.id;
})
.then(id => {
console.log("ID:", id);
});
.then() returns a new promise, enabling chaining.