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

1023saw 'undefined' (a reserved word)

Expand Messages
  • donavon.west
    Dec 16, 2009
    • 0 Attachment
      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");

    • Show all 7 messages in this topic