Mid JavaScript

How do you chain Promises?

fetch('/api/data')

.then(res => res.json())

.then(data => console.log(data))

.catch(err => console.error(err));

More from JavaScript Tutorial

All questions for this course