Function.prototype.bind

Mark S. Miller erights at google.com
Tue Sep 9 23:11:26 PDT 2008


On Tue, Sep 9, 2008 at 11:09 PM, Mark S. Miller <erights at google.com> wrote:
> function logCall(thisVal, meth, args) {
>    log('applying ' + meth + ' to ' + args + ' with ' + thisVal);
>    return func.apply(thisVal, args);
> }

Oops. I meant

function logCall(thisVal, meth, args) {
   log('applying ' + meth + ' to ' + args + ' with ' + thisVal);
   return meth.apply(thisVal, args);
}


-- 
    Cheers,
    --MarkM


More information about the Es-discuss mailing list