IT lexicon Programming Callback

Callback

Programming På svenska → Updated: 2026-05-23

A function you pass as an argument to another function, which calls it later when something happens.

setTimeout(() => alert('hi'), 1000) — the arrow function is the callback. Most common in JS before Promise and async/await took over.

"Callback hell" = deeply nested callbacks that become unreadable. The fix was Promises.

← Back to the lexicon