I'm using node async, and I'd like to pass a variable to the method that it uses within the second parameter... e.g:
async.map(submissions, addScore, function(err, submissions) {
if (submissions) {
return submissions;
}
});
I want to pass userId
along with addScore
but am not sure how to do this.
addScore
is my method that I call on every submission and it requires a userId
.