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:
Ansh Malgotra
2025-11-21 14:33:26 +05:30
committed by GitHub
parent 35f3f4bd5b
commit dc8b75ba3f
@@ -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.
---