Pregunta de entrevista de Outlier Technologies

Refactor this JavaScript snippet to use promises rather than callbacks.