Javascript Promise.all sollution
Code


# Code
```javascript []
var promiseAll = function(functions) {
    let result = [];
    let completed = 0;

    return new Promise((resolve, reject) => {
        for (let i = 0; i < functions.length; i++) {
            functions[i]().then((promise) => {
                result[i] = promise;

                completed++; 

                if (completed === functions.length) {
                    resolve(result);
                }
            }).catch((err) => {
                reject(err); 
            });
        }
    });
};
```
['JavaScript']