Skip to content

Instantly share code, notes, and snippets.

@scizers
Last active August 29, 2015 14:03
Show Gist options
  • Save scizers/c7f223d94d529ae14a17 to your computer and use it in GitHub Desktop.
Save scizers/c7f223d94d529ae14a17 to your computer and use it in GitHub Desktop.
using recurrsion in node
var createUser = function(userId, callback) {
getLevelIds(userId, function(arr){
console.log(userId , arr , 'test')
userId = arr
callback();
})
}
async.times(2, function(n, next){
createUser(userId, function(err, user) {
next(err, user)
})
}, function(err, users) {
console.log('saved')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment