scrimba
Frontend Career Path
Working with APIs
Async JS
Promises - passing basic values in the chain
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Promises - passing basic values in the chain
AboutCommentsNotes
Promises - passing basic values in the chain
Expand for more info
index.js
run
preview
console
/**
* Time to be curious!
*
* What would happen if you didn't return `res.json()`
* from the first .then block?
*
* What would the next .then() callback receive as its
* parameter if you returned something totally different??
*/

fetch("https://apis.scrimba.com/bored/api/activity")
.then(function(res) {
return ___
})
.then(function(___) {

})
Console
/index.html
-5:18