Skip to content

Files

Latest commit

42730eb · Jan 23, 2023

History

History

callbacks

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 23, 2023
Jan 23, 2023

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)