What’s the difference between a continuation and a callback?

I believe that continuations are a special case of callbacks. A function may callback any number of functions, any number of times. For example: var array = [1, 2, 3]; forEach(array, function (element, array, index) { array[index] = 2 * element; }); console.log(array); function forEach(array, callback) { var length = array.length; for (var i = … Read more

tech