Problem 2776 · Medium

Convert Callback Based Function to Promise Based Function

teaching model: wrap a callback-style function so its error argument rejects the promise and its value resolves it.

Open the interactive visualisation