Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 366 Bytes

File metadata and controls

15 lines (13 loc) · 366 Bytes

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)