Learn advanced node js, The promisify function



Both promises and callbacks can be used to handle asynchronicity within JavaScript. Promises make the code a little bit nicer, so Node JS comes with a way to quickly convert callback functions into promises. I’m inside of the exercise files for chapter one, chapter one, lesson four, and in the start folder, our Index dot JS has our delay function that uses callbacks. This delay function also incorporates errors. So the Node JS rule is that errors are always passed to the callback function as…

, , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *