Promise.all

Implement a function that mimics Promise.all behavior. It should take an array of promises and return a single promise that resolves when all input promises resolve, or rejects if any promise rejects.

Examples
Input: [[{},{}]]
Output: [1,2]
Hints

Promise.all

Implement Promise.all() which resolves to an array of results or rejects if any input rejects.