fix: mention top-level module body in async/await lecture#66933
fix: mention top-level module body in async/await lecture#66933whatfontisthis wants to merge 1 commit intofreeCodeCamp:mainfrom
Conversation
|
Hi there, Thanks for opening this pull request. The automated checks found some issues: Checklist: The PR description is missing the required checklist or some of its items are not completed:
Please edit your PR description to include the following template with the checklist items completed. Checklist:
<!-- Please follow this checklist and put an x in each of the boxes, like this: [x]. It will ensure that our team takes your pull request seriously. -->
- [ ] I have read and followed the [contribution guidelines](https://contribute.freecodecamp.org).
- [ ] I have read and followed the [how to open a pull request guide](https://contribute.freecodecamp.org/how-to-open-a-pull-request/).
- [ ] My pull request targets the `main` branch of freeCodeCamp.
- [ ] I have tested these changes either locally on my machine, or GitHub Codespaces.
<!--If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.-->
Closes #XXXXX
<!-- Feel free to add any additional description of changes below this line -->Join us in our chat room or our forum if you have any questions or need help with contributing. |
|
This PR seems to make similar changes as an existing PR. As such, we are going to close this as a duplicate. If you feel you have additional changes to expand upon this PR, please feel free to push your commits and request this PR be reopened. Thanks again! 😊 If you have any questions, feel free to ask questions on the "Contributors" category on our forum or the contributors chat room. |
Checklist:
mainbranch of freeCodeCamp.Closes #66932
Summary
The async/await lecture currently states that
awaitcan only be used inside anasyncfunction, which is incomplete. Since ES2022,awaitcan also be used at the top level of ES modules (top-level await).Changes
Lecture prose — updated the key sentence from:
to:
Quiz answer — updated the correct answer for question 2 ("Where can the
awaitkeyword be used?") from "Insideasyncfunctions." to "Insideasyncfunctions or at the top level of a module." to match the updated content.This change was reviewed and approved in the issue thread by @naomi-lgbt.