Clément Renaud

|

By convention, lots of libraries were passing an error message as the first argument to make it easier to check for errors.

function doThis(callback){ 
    callback(error, data);
}

doThis( error, data => {
    if (error) handleError(); // error
    console.log(data); // success
})

As more code is moving to use Promise, this convention may disappear leaving developers with no real answer to this question.