🔥 Beginner Friendly Promise.All Solution 🔥
Code\n```\n/*\n * @param {Array} functions\n * @return {Promise}\n /\nvar promiseAll = async function (functions) {\n    return new Promise((resolve, reject) =>
# Code\n```\n/**\n * @param {Array<Function>} functions\n * @return {Promise<any>}\n */\nvar promiseAll = async function (functions) {\n    return new Promise((resolve, reject) => {\n        const results = [];\n        let completed = 0;\n\n        if (!functions.length) {\n            resolve(results);\n        }\n\n        functions.forEach((asyncFunc, index) => {\n            asyncFunc()\n                .then(result => {\n                    results[index] = result;\n                    completed++;\n                    if (completed === functions.length) {\n                        resolve(results);\n                    }\n                })\n                .catch(reject);\n        });\n    });\n};
['JavaScript']