Q:

Parse.com Query Find with Javascript closure completion handler not showing results

I'm using Parse.com javascript API to write a Node.js script for an app I'm working on.  Very new to JS.
I’m trying to capture the local values using a javascript closure so that for each execution of the loop, the success Handler will have the proper values of userId and userName at the time of the loop when it generates the completion Handler.  After doing my research on javascript closures, this seems to be the way to do it.  In fact, the successClosure is called the appropriate amount of times and with the right values of nameStuff and userStuff.  However, results is always Undefined.   Does this have something to do with Parse’s Javascript API?  Will this not work with Parse’s Query Find?  Because when I simply use function(results) { … } as the success parameter, the results are there but the local variables aren’t right.  
for (i = 0 ; i < results.count; i++) {

    var query = //Some Parse query based on results[i]
    var userId = …
    var userName = …

    var successHandler = successClosure(userName, userID)

    query.find({success : successHandler,
       error : {}
    });

    }

...
function successClosure(userName, userId) {

    var nameStuff = userName
    var userStuff = userId

    return function(results) {

        console.log(nameStuff, userStuff)
        console.log(results)
    }

}

A:

I figured it out.  What I'm doing is actually correct.  I thought it was wrong because I was accessing results.count instead of results.length, thinking it was results that was undefined.  But in fact it was me being a JS noob and not knowing the correct API :(.  I'm an iOS dev so I'm used to having a compiler help me!!

