From b6c8260faf5acca521f70d4c627fe277e85f1e0b Mon Sep 17 00:00:00 2001 From: Edwin Manual Date: Sat, 29 Apr 2023 07:27:34 +0530 Subject: [PATCH] fix: Correct syntax error in Promise initialization example by adding space --- .../nodejs/content/104-nodejs-async-programming/102-promises.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/roadmaps/nodejs/content/104-nodejs-async-programming/102-promises.md b/src/data/roadmaps/nodejs/content/104-nodejs-async-programming/102-promises.md index a2677eea9..590830422 100644 --- a/src/data/roadmaps/nodejs/content/104-nodejs-async-programming/102-promises.md +++ b/src/data/roadmaps/nodejs/content/104-nodejs-async-programming/102-promises.md @@ -5,7 +5,7 @@ Asynchronous functions use promise behind the scenes, so understanding how promi Once a promise has been called, it will start in a pending state. This means that the calling function continues executing, while the promise is pending until it resolves, giving the calling function whatever data was being requested. Creating a Promise: -The Promise API exposes a Promise constructor, which you initialize using newPromise(). +The Promise API exposes a Promise constructor, which you initialize using new Promise(). Using resolve() and reject(), we can communicate back to the caller what the resulting Promise state was, and what to do with it.