« Return to Thread: Re: Section 13.2: Rationale for "caller", "arguments" restriction

Re: Section 13.2: Rationale for "caller", "arguments" restriction

by Mark S. Miller-2 :: Rate this Message:

Reply to Author | View in Thread

On Tue, May 26, 2009 at 6:05 PM, Mark S. Miller <erights@...> wrote:

    function laundry(obj, verb, args) {
      "use strict";
      return obj[verb].apply(obj, args);
    }


A better laundry:

    function laundry(fun, thisArg, args) {
      "use strict";
      return fun.apply(thisArg, args);
    }


--
   Cheers,
   --MarkM

_______________________________________________
es-discuss mailing list
es-discuss@...
https://mail.mozilla.org/listinfo/es-discuss

 « Return to Thread: Re: Section 13.2: Rationale for "caller", "arguments" restriction