
Promise.then() – Handles the fulfilled result of a promise. You can chain `.then()` calls to perform sequential actions.
๐ Syntax
promise.then(result => {
// handle result
});
๐งช Example
fetch('https://api.example.com')
.then(res => res.json())
.then(data => console.log(data));
Comments
Post a Comment