mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): updated callback function definition and comprehension check question (#63924)
Co-authored-by: majestic-owl448 <26656284+majestic-owl448@users.noreply.github.com> Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -7,7 +7,7 @@ dashedName: what-is-a-callback-function-and-how-does-it-work-with-the-foreach-me
|
||||
|
||||
# --interactive--
|
||||
|
||||
In JavaScript, a callback function is a function that is passed as an argument to another function and is executed after the main function has finished its execution. It's a way to ensure that certain code doesn't execute until a previous operation has been completed.
|
||||
In JavaScript, a callback function is a function that is passed as an argument to another function, so that the outer function can invoke it at a specific point.
|
||||
|
||||
This concept is fundamental to understanding many aspects of JavaScript, including how the `forEach` method works.
|
||||
|
||||
@@ -95,7 +95,7 @@ Think about why we might want to pass a function as an argument to another funct
|
||||
|
||||
---
|
||||
|
||||
To execute code after another operation has completed.
|
||||
To allow a function to run another piece of code at a later point.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user