Junior — Senior
Creating a function similar to Promise.all
livecode
Task condition
It is necessary to write a function that mimics the behavior of Promise.all. The function should accept an array of promises and return a new promise. This returned promise should resolve with an array of values obtained from all the passed promises, or reject immediately upon the first error of any of them.