mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): replace a question in JavaScript Asynchronous Programming lecture (#61173)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
+12
-12
@@ -113,36 +113,36 @@ The JavaScript code you write.
|
||||
|
||||
## --text--
|
||||
|
||||
What is the purpose of the event loop in JavaScript?
|
||||
Which of the following best describes the difference between a JavaScript engine and its runtime?
|
||||
|
||||
## --answers--
|
||||
|
||||
To create visual loops in web animations.
|
||||
The engine provides features like the Fetch API and the DOM; the runtime only parses and executes code.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Think about how JavaScript handles tasks that might take some time to complete.
|
||||
Think about the distinct roles of the JavaScript engine and the runtime environment.
|
||||
|
||||
---
|
||||
|
||||
To repeatedly execute a block of code.
|
||||
The engine parses and executes code; the runtime provides the engine plus additional features like the Fetch API and the DOM.
|
||||
|
||||
---
|
||||
|
||||
The runtime compiles code into bytecode and machine code; the engine just interprets the code.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Think about how JavaScript handles tasks that might take some time to complete.
|
||||
Think about the distinct roles of the JavaScript engine and the runtime environment.
|
||||
|
||||
---
|
||||
|
||||
To manage asynchronous operations and keep the program responsive.
|
||||
|
||||
---
|
||||
|
||||
To loop through arrays efficiently.
|
||||
They are the same thing—engine and runtime are interchangeable terms.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Think about how JavaScript handles tasks that might take some time to complete.
|
||||
Think about the distinct roles of the JavaScript engine and the runtime environment.
|
||||
|
||||
## --video-solution--
|
||||
|
||||
3
|
||||
2
|
||||
|
||||
Reference in New Issue
Block a user