I am not sure if I understand the answer part:
why the author, put the next as a callback, and I think the question does not ask like that :(
I think it should be something like this:
function processItems(items, processItem) {
"use strict";
var i;
function y() {
return true;
}
for (i = 0; i < items.length; i = i + 1) {
processItem(items, y);
}
}
// x ---> processItem
function x(item, successCB) {
"use strict";
if (successCB && typeof successCB === "function") {
successCB.call();
}
}
Kind Regard
kenmatin