Still reading…
The definitive javascript guide, does give me a clue to some of the confusion around my earlier test e.g.
fetch(translate('why'))
.then(response => response)
.then(console.log)
// 1. ‘Me first!’
// 2. fulfilled response object
// 3. ‘Hello’
It appears I am mistaking a fulfilled response with a resolved one
A promise is fulfilled when the HTTP status and the headers are available, and albeit it provides .text and .json methods which have access to the body, it doesn’t guarantee that the body of the response has arrived. So when we do
.then(response => response.json()) // promise returned
.then(parsed => something)
a promise is returned
Thanks for the help and apologies for being so stubbornly dense. lol
Note it is still kind of frustrating that other sources don’t really seem to go into enough depth. No mention of the network queue or the fulfillment array, just a ‘trust me’ approach. more to read…