parameter of the anonymous function need to be modified and stored in a global variable in javascript

How do I get the value returned by the anonymous function which is used as a parameter in another javascript function?

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

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);    
});

Assuming that the supplied function is called asynchronously, you shouldn't be using its return value outside of that scope because you won't know at what point that function will be called.

You'd need to make all further processing start from within that callback function, where the status variable is either in scope, or is passed directly to those later functions, i.e.

pushNotification.registerDevice({alert:true, badge:true, sound:true}, function(status) {
    console.warn('registerDevice:%o', status);

    // do stuff with "status"
    func1(status);

    // even put it in a global if you really must
    global.status = status;
});

// processing continues here immediately, you can't access
// "status" here because it won't have been set yet.

console.log(global.status);  //  -- probably undefined