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

2198Proposed: option.overparam

Expand Messages
  • Rob Richardson
    May 7, 2011
    • 0 Attachment
      I'd like to know when I've passed in more parameters than the function will
      use:

      /*jslint white: true, onevar: true, undef: true, nomen: true, regexp: true,
      plusplus: true, bitwise: true, newcap: true */
      (function () {
      `
      ` var a = function (one, two) {
      ` // ...
      ` };
      `
      ` a(1, 2, 3); // <-- I've passed in too many
      `
      }());

      I grant that some functions declare themselves as having no (or fewer)
      parameters, then inspect arguments to handle them all, but this is confusing
      for the novice user of this code.

      Rob
    • Show all 9 messages in this topic