3 ms·
It "works" but foo won't contain the resolved value, just the promise. The code is awaiting an array, which is already "resolved" and its returned right away.
by bfred_it 9y ago
It "works" but foo won't contain the resolved value, just the promise.
The code is awaiting an array, which is already "resolved" and its returned right away. Its contents are not relevant to `await`.
- abritinthebay 9y agoYou are correct! My apologies = I misremembered how that works >_< Yes, once you have a promise you have to deal with it as such through the whole chain.