jscritic icon indicating copy to clipboard operation
jscritic copied to clipboard

`undefined` incorrectly labeled as unused.

Open jdalton opened this issue 11 years ago • 2 comments

Here is a small repro:

(function() {
  var undefined;
  function foo() {
    return arguments[0] || undefined;
  }
  return foo;
}());

jdalton avatar Apr 03 '14 20:04 jdalton

Looks like JSHint issue. Plugged this in jshint.com and it showed "undefined" as unused.

kangax avatar Apr 03 '14 20:04 kangax

Filed as https://github.com/jshint/jshint/issues/1604

kangax avatar Apr 03 '14 20:04 kangax