arozwalak
10/18/2013 - 7:56 AM

Javascript: Private parameters

Javascript: Private parameters

function myPowerConstructor(x) {
    var that = otherMaker(x);
    var secret = f(x);
    that.priv = function() {
        ... secret x that ....
    };
    return that;
}