I will definitely say that in most cases you will see the following signature for callbacks.
function (err, result)
Today it is standard.
But it also depends on what you need to βreturnβ, as in the createServer example, where two objects are passed back to the callback.
createServer(function (req, res) { });
This is basically an exception, and in most libraries you will see the first form.
theprogrammer
source share