On you dumbed down question (which is synchronous). Sure you could, but you'd have to return the value from your callback, your callback handler and your calling function.
var a = function (param, callback) {
return callback(param);
};
var base = function () {
return a(5, function (a) {
return 2*a;
});
}
This would not work in an asynchronous case, Then you need callback functions, or instead returning a deferred, promise or future.
For example
function asynchDoubler(number) {
var deferred = new Deferred();
setTimeout(function () {
deferred.callback(2*number);
}, 1);
return deferred;
}
asynchDoubler(5).addCallback(function (result) {
console.log(result);
});
// outputs 10