I am trying to use the array destructing assignment to get the results from Promise.all(). Here is my code:
const[_, resFunc2] = await Promise.all([
func1(),
func2(),
]);
func1 doesn't return any value, and func2 returns a value which will be assigned to resFunc2. I want to ask what's the best practice for handling the result of func1 since func1 doesn't return any value? Thanks a lot~
func1returns a promise that resolve innull?Array#filterto removeundefinedvalues?.filter(x => x !== undefined)