Easy to understand solution | Beginner friendly readability
Code

# Code
```javascript []
/**
 * @param {Array<Function>} functions
 * @return {Promise<any>}
 */
var promiseAll = function(functions) {
    return new Promise((res,rej) => {
        let n = functions.length;
        let count = 0, values = [];
        const handleResolve = (val, index) => {
            values[index] = val;
            count++;
            if(count===n) res(values);
        }
        for(let i = 0; i<n; i++){
            let f = functions[i];
            f().then((data) => handleResolve(data, i)).catch(rej);
        }
    })
};

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