I am trying to use the async utility for the node.js. Below is my code. The console prints "In my func1" and "In my func2". I also expect it to print "call back func" but it won'nt
var myfunc1 = function(callback) {
var a = 1;
console.log ("In my func1");
};
var myfunc2 = function(callback) {
var b = 2;
console.log ("In my func2");
};
models.Picture.prototype.relativeSort = function(viewer_location) {
console.log("Rel Sort");
var sortedPics = [];
var relsortedPics = [];
// Finds all the pictures
async.series([myfunc1(), myfunc2()],
function(err, results){
if(err) {
throw err;
}
console.log("call back func");
return a+b;
});
};