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

1024Re: [jslint] saw 'undefined' (a reserved word)

Expand Messages
  • Aseem Kishore
    Dec 16, 2009
    • 0 Attachment
      Yeah I've run into that too. I know that jQuery uses that technique, as it
      allows for munging of the undefined name. I think it might also improve
      lookup performance but I'm not 100% sure of that. Either way, it would be
      nice if JSLint allowed that, maybe through an option if you don't want to
      change the default.


      On Wed, Dec 16, 2009 at 11:13 AM, donavon.west

      > In JavaScript/ECMAScript, undefined is NOT a reserved word, but I get the
      > error "Expected an identifier and instead saw 'undefined' (a reserved word)"
      > when JSLinting the following code:
      > /*global window, someGlobalFn, alert */
      > (function(window, undefined) {
      > if (someGlobalFn() === undefined) {
      > alert("sorry, undefined");
      > }
      > })(window);

      [Non-text portions of this message have been removed]
    • Show all 7 messages in this topic