Currently, I'm creating and assigning values to a few variables at once, as the result of corresponding asynchronous functions resolving as such:
const [first, second] = await Promise.all([asynFunc(),asynFunc()])
Then, I'm creating an array with first and second:
const res = [first, second]
Is there a way to combine the steps to both create res
as well as create and assign first
and second
?