Check this simple javaScript solution, but beats 98.89% in runtime 🔥
\n# Code\njavascript []\n/**\n * @param {Array<Function>} functions\n * @return {Promise<any>}\n */\n\nvar promiseAll = function(functions) {\n    return new Pr
\n# Code\n```javascript []\n/**\n * @param {Array<Function>} functions\n * @return {Promise<any>}\n */\n\nvar promiseAll = function(functions) {\n    return new Promise((resolve, reject) => {\n        const results = []\n        let fn = 0\n        functions.forEach((promiseFunction, index) => {\n            promiseFunction()\n            .then(result => {\n                results[index] = result\n                fn ++\n                if(fn === functions.length) {\n                    resolve(results)\n                }\n            }).catch(error => {\n                reject(error)\n            })\n        })\n    })\n};\n\n/**\n * const promise = promiseAll([() => new Promise(res => res(42))])\n * promise.then(console.log); // [42]\n */\n```
['JavaScript']