Need a second pair of eyes... spot anything wrong with this? My inner function is not returning the value. I must be messing something up with the scope?
 function getGroups(account){
    var name;
   // name = 'assigned'; I work
    account.getGroups(function(err, groups) {
        //removed logic for simple debugging 
        name ='test';
        //return name;
    });
    return name;
}
When assigning the variable in the parent function ie var name = 'assigned' it works.
 
     
    