LifeOmic interview question

How would you write your own implementation of Promise.all() in NodeJS?