Loading ...
Sorry, an error occurred while loading the content.

Re: [jslint] becoming closure

Expand Messages
  • Robert Sauer-Ernst
    so the memoizer function will pass now: var memoizer = function (memo, formula) { var recur; recur = function (n) { var result = memo[n]; if (typeof result !==
    Message 1 of 3 , Jun 6, 2011
    • 0 Attachment
      so the memoizer function will pass now:

      var memoizer = function (memo, formula) {
      var recur;
      recur = function (n) {
      var result = memo[n];
      if (typeof result !== 'number') {
      result = formula(recur, n);
      memo[n] = result;
      }
      return result;
      };
      return recur;
      };

      http://tech.groups.yahoo.com/group/jslint_com/message/2216




      --- Original Nachricht ---

      Von: Douglas Crockford <douglas@...>
      Am: Sun, 05 Jun 2011 15:21:08 -0000
      Betreff: [jslint] becoming closure
      An: jslint_com@yahoogroups.com
      CC:
      >
      > JSLint will now accept
      >
      > var x = function () { ... x ... };
      >
      > but will still warn on
      >
      > var x = x + 1;
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.