Callback Function

A function passed to other code to be called later or during an operation.

What is Callback Function in JavaScript?

Callback Function — A function passed to other code to be called later or during an operation.

function greet(name) {
    return `Hello, ${name}`;
}

const names = ["Ada", "Lin"];
const greetings = names.map(greet);

Level: Apprentice · More JavaScript terms at this level

Updated