You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,8 @@ Top JavaScript interview questions
56
56
| 48 |[What is an event loop](#48-what-is-an-event-loop)|
57
57
| 49 |[ES6 and its features](#49-es6-and-its-features)|
58
58
| 50 |[Difference between function and method](#50-difference-between-function-and-method)|
59
+
| 51 |[What is aync and await](#51-what-is-aync-and-await)|
60
+
59
61
60
62
### 1. What is JavaScript
61
63
* JavaScript is a scripting language used to create dynamic and interactive websites. It is supported by all major web browsers.
@@ -772,6 +774,18 @@ function sum(a, b) {
772
774
}
773
775
sum(2,4);
774
776
```
775
-
******************************In progress
777
+
778
+
### 51. What is aync and await
779
+
async/await is a feature in JavaScript that allows us to write asynchronous code that looks more like synchronous code. "await" works only inside "async" functions
780
+
781
+
"async" ensures that a function returns a promise and "await" pause the execution of the function until a promise is resolved or rejected.
0 commit comments