I have the following code:
const response = Promise.all([
await fetch(`http://${location.hostname}${this.config.baseName}/data.php`),
await fetch(`http://${location.hostname}${this.config.baseName}/data.php?a=3423`)
]);
const body = JSON.parse(await response.[[PromiseValue]][1].text());
I know the last line's response.[[PromiseValue]]
is not the proper syntax. But when I look in Chrome developer tools, I see that [[PromiseValue]] is the property name.
How do I reference the second element of the promise value array?
EDIT I don't believe my question is related to What is the significance of the double brackets for the [[prototype]] property in JavaScript?
I'm asking about HOW to reference the results of a Promise.All. I'm not asking about the significance of double square brackets.