Skip to content

Latest commit

 

History

History

callbacks

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

JavaScript - Callbacks

A callback is a function passed as an argument to another function.

  • Syntax of Callback function
    const nameOfFunction = (parameters, callback) => {
        //statements
        callback();
    };
    const callbackFunction = () => {
        //statements
    };
    nameOfFunction(arguments, callbackFunction)