Describe the Issue
In the lecture on Async/Await called "What Is Async/Await, and How Does It Work?", the following somewhat awkward and somewhat incomplete statement is made:
Only inside an async function, you can use the await keyword, which allows you to wait for a Promise to resolve before moving on to the next line of code.
I am proposing that this should be corrected to:
The await keyword, which allows you to wait for a Promise to resolve before moving on to the next line of code, can only be used inside of asynchronous functions or the top level bodies of modules.
This change would make it so the sentence mentions that await can be used in the body of a module, which was missing in the prior statement. (discussed with @naomi-lgbt who has approved the proposed change)
The file that would need to change is:
freeCodeCamp/curriculum/challenges/english/blocks/lecture-understanding-asynchronous-programming/673407d56c3dce67fa97969b.md
Affected Page
https://www.freecodecamp.org/learn/javascript-v9/lecture-understanding-asynchronous-programming/what-is-async-await-and-how-does-it-work
Describe the Issue
In the lecture on Async/Await called "What Is Async/Await, and How Does It Work?", the following somewhat awkward and somewhat incomplete statement is made:
I am proposing that this should be corrected to:
This change would make it so the sentence mentions that await can be used in the body of a module, which was missing in the prior statement. (discussed with @naomi-lgbt who has approved the proposed change)
The file that would need to change is:
freeCodeCamp/curriculum/challenges/english/blocks/lecture-understanding-asynchronous-programming/673407d56c3dce67fa97969b.md
Affected Page
https://www.freecodecamp.org/learn/javascript-v9/lecture-understanding-asynchronous-programming/what-is-async-await-and-how-does-it-work