Adobe Interview Question

JS: build a function to promisify another function