The Continuation-Passing Style in JavaScript

JavaScript Notes

2018.12.21

The Continuation-Passing Style in JavaScript

In JavaScript, a callback is a function that is passed as an argument to another function and is invoked with the result when the operation completes. In functional programming, this way of propagating the result is called continuation-passing style (CPS). It simply indicates that a result is propagated by passing it to another function (the callback), instead of directly returning it to the caller.

Ads by Google
Ads by Google