Which of the following best describes a JavaScript callback function?

  • A function passed as an argument to another function and executed later
  • A function used to display pop-up messages
  • A function that runs immediately after it's defined
  • A function that loops through an array
A JavaScript callback function is a function that is passed as an argument to another function and is executed later, often after the completion of an asynchronous operation. It's a fundamental concept for handling asynchronous tasks and allows for flexible and event-driven programming.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *