Grokking Advanced JavaScript
Vote

0% completed

​

Callback Functions

A function that you pass as an argument to another function, so that the other function can call it, is called a callback. JavaScript functions are values, just like numbers and strings, so you can pass one to a function in the same way you pass any other argument. The function that receives the callback decides when to call it and which arguments to give it.

Callbacks appear throughout the language: in array methods such as forEach and map, in event handlers that run when a user clicks a button, and in asynchronous operations that report their result later

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content