Last active
December 11, 2015 09:08
-
-
Save arisolt/4577530 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var async = require('async') | |
var final_array = []; | |
function a(param) { | |
return function() { | |
param * 10; | |
}; | |
}; | |
function b() { | |
function c(callback){ | |
var arr = []; | |
for (var i = 1; i <= 3; i++) { | |
arr.push(a(i)); | |
}; | |
callback(null, arr); | |
}; | |
function d(arr, callback){ | |
console.log(arr[1]()); | |
callback(); | |
}; | |
async.waterfall([c, d]); | |
}; | |
b(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment