storing the parameter of the anonymous function in a variable
<p>How to get the value return by the anonymous function which is used as a parameter in another javascript function ?</p>

<p>In the following method call <code>registerDevice</code>, I want to get "status" value of anonymous function outside that function scope.</p>

<pre><code>pushNotification.registerDevice({alert:true, badge:true, sound:true}, function(status) {
    // if successful status is an object that looks like this:
    // {"type":"7","pushBadge":"1","pushSound":"1","enabled":"1","deviceToken":"blablahblah","pushAlert":"1"}
    console.warn('registerDevice:%o', status);
});
</code></pre>

<p>How can I get that?</p>
