MCQ Single Best Answer Not Set

QWhat is a callback function in JavaScript?

ID: #4875 Javascript Functions MCQ 265 views
Question Info
#4875Q ID
Not SetDifficulty
Javascript Functions MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A A function that is executed after a certain event occurs
  • B A function that is passed as an argument to another function
  • C A function that is executed immediately
  • D None of these
Correct Answer: Option B

Explanation

A callback function is a function that is passed as an argument to another function.
It is called (or "executed") when the event that it was passed to occurs.
Callback functions are often used to execute a certain task after an asynchronous operation has completed.

Share This Question

Challenge a friend or share with your study group.