Tray.ai Interview Question

Convert a function with a callback in a promise