ServiceTitan Interview Question

Recreate Promise.all function. How do you return a new Promise.