Hello i am using async parallel in my code for practice code
var tasklist = [],tempjson={};
for(var i = 0; i < 10; i++) {
tempjson.data = 'i is' + i;
for(var j = 0; j < 20; j++){
tasklist.push(doSomething(tempjson,j));
}
}
async.parallel(taskList, function(err, data) {
console.log(data);
});
function doSomething(params,j){
params.data2 = 'j value is'+ j
return callback(null,params)
}
want to do something like that but i am getting error that callback is undefined can somebody help me what is wrong with code