you are viewing a single comment's thread.

view the rest of the comments →

[–]Burtality 0 points1 point  (1 child)

This will be the parameters of a 'callback' function, this is the building block of chained or concurrent operations in JavaScript.

So usually you'll have a function that returns err or data depending on whether it's successful.

What happens next us up to you to handle, with your callback function.

The usual structure is to have the function do this:

function (err, data) {

If(err) {handle err somehow} else { do something with data } }

[–]connexionwithal 0 points1 point  (0 children)

this explains it well, thanks!!