How do you convert a callback-based function into a Promise-based function?
Difficulty: 5/10
promisify, error handling, async/await
You can wrap the callback-based function using the await keyword or Promise constructor, resolving or rejecting the Promise based on the callback's outcome.