I'm finally getting back into serious software development after a year off and lost my javascript reference book. Sorry if this is a stupid question, but I've forgotten what this ending parenthetical means in javascript.
Here is some example code:
login: function (req, res) {
example.function('optionA', function (err, user) {
if (err) return res.send(err);
return res.send(user);
})(req, res);
});
It's that (req, res) that is confusing me, how exactly does that work?
Thanks in advance. Not feeling like Albert Einstein right now!