Code Snippets:
var async = require("async");
async.map([
"a",
"b",
"c"
], function(thing, callback) {
console.log(thing + "-something");
callback();
},
function(err, results){
if (err) return console.error(err);
console.log(results);
});
My current results:
a-something
b-something
c-something
[ undefined, undefined, undefined ]
My desired results:
[ a-something, b-something, c-something ]
Could you guys tell me what I am getting wrong? How do I have access to the results object in the callback?