Simple to understand solution 
CodePlease upvote if you like it :)

# Code
```javascript []
/**
 * @param {Array<Function>} functions
 * @return {Promise<any>}
 */
var promiseAll = function(functions) {
    return new Promise((resolve,reject)=> {
        let result = [];
        let count = 0;
        if(functions.length == 0) resolve([]);
        for(let i=0; i<functions.length; i++){
            functions[i]().then((res)=> {
                count++;
                result[i] = res;
                if(count === functions.length) resolve(result)
            }).catch(err=> reject(err));
        }
    })
};

/**
 * const promise = promiseAll([() => new Promise(res => res(42))])
 * promise.then(console.log); // [42]
 */
```

Please upvote if you like it :)
['Array', 'JavaScript']