What is a promise chain?
Promise chaining allows multiple async tasks to run sequentially.
Example:
fetch('/data')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
Promise chaining allows multiple async tasks to run sequentially.
Example:
fetch('/data')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));