guest271314 (2019-06-21T13:41:17.000Z)
guest271314 at gmail.com (2019-06-21T14:09:05.258Z)
```const image = await [null].reduce(async user => fetch('/image/'+ (await user).image).json(), fetch('/user/'+id).json())``` or ```const image = await fetch('/image/'+ (await (await fetch('/user/'+id)).json()).image).json()``` Or use ```Promise.all()```. Or an immediately invoked async arrow function where a value is ```return```ed from the function. How do you propose to get the values declared within block scope (a different scope) outside of the block? How does JavaScript know ```const image = {}``` is intended to be block scope and not a JavaScript plain object declaration?
guest271314 at gmail.com (2019-06-21T14:07:24.968Z)
```const image = await [null].reduce(async user => fetch('/image/'+ (await user).image).json(), fetch('/user/'+id).json())``` or ```const image = await fetch('/image/'+ (await (await fetch('/user/'+id)).json()).image).json()``` Or use ```Promise.all()```. Or an immediately invoked async arrow function where a value is ```return```ed from the function. How do you propose to get the values declared within block scope (a different scope) outside of the block?
guest271314 at gmail.com (2019-06-21T13:57:18.289Z)
```const image = await [null].reduce(async user => fetch('/image/'+ (await user).image).json(), fetch('/user/'+id).json())``` or ```const image = await fetch('/image/'+ (await (await fetch('/user/'+id)).json()).image).json()``` Or use ```Promise.all()```. Or an immediately invoked async arrow function where a value is ```return```ed from the function. How do you propose to get the values declared within block scope (a different scope)?
guest271314 at gmail.com (2019-06-21T13:43:42.435Z)
```await [null].reduce(async user => fetch('/image/'+ (await user).image).json(), fetch('/user/'+id).json())``` Or use ```Promise.all()```. Or an immediately invoked async arrow function where a value is ```return```ed from the function. How do you propose to get the values declared within block scope (a different scope)?