From 00ba8a73c1561e6544dbe6d8307b465175a9023e Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Sat, 23 Sep 2023 15:34:50 +0600 Subject: [PATCH] wip: add more questions --- src/data/question-groups/javascript/javascript.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/data/question-groups/javascript/javascript.md b/src/data/question-groups/javascript/javascript.md index b06df4833..67b9c7699 100644 --- a/src/data/question-groups/javascript/javascript.md +++ b/src/data/question-groups/javascript/javascript.md @@ -128,4 +128,14 @@ questions: topics: - 'Core' - 'Intermediate' + - question: What is a JavaScript promise? + answer: A Promise in JavaScript represents a value that may not be available yet but will be at some point. Promises provide a way to handle asynchronous operations, offering methods like `.then()` and `.catch()` to register callbacks for success and failure. + topics: + - 'Core' + - 'Advanced' + - question: What is the purpose of the `async/await` in JavaScript? + answer: The `async/await`, introduced in ES2017, provides a more readable and cleaner way to handle asynchronous operations compared to callbacks and promises. An `async` function always returns a promise, and within such a function, you can use `await` to pause execution until a promise settles. + topics: + - 'Core' + - 'Advanced' ---