ServiceTitan interview question

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