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

Re: saw 'undefined' (a reserved word)

Expand Messages
  • samckayak
    ... Sounds like you use JSLint as a syntax checker. Equally important is JSLint s ability to define a safe, reliable, readable subset of JavaScript.
    Message 1 of 7 , Dec 17, 2009
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "donavon.west" <donavonwest@...> wrote:
      >
      > But the fact remains that undefined is NOT a reserved word yet JSLint erroneously reporting that it is. What I'm doing in the example given (which you call sloppy code) works perfectly fine, is becoming a common practice and JSLint should allow it.
      >

      Sounds like you use JSLint as a syntax checker. Equally important is JSLint's ability to define a safe, reliable, readable subset of JavaScript. Excluding variable names like "undefined" fits into this category of unsafe practices, like excluding "exec()".
    • donavon.west
      Using undefined in such a way is not even remotely in the same ballpark as using exec(). Again undefined is NOT a reserved word. Keep the in JSLint warning if
      Message 2 of 7 , Dec 17, 2009
      • 0 Attachment
        Using undefined in such a way is not even remotely in the same ballpark as using exec(). Again undefined is NOT a reserved word. Keep the in JSLint warning if you must but at least change the error message. "Eval is evil", I get that. It doesn't say "Eval is not a JavaScript function".

        --- In jslint_com@yahoogroups.com, "samckayak" <samc@...> wrote:
        >
        >
        >
        > --- In jslint_com@yahoogroups.com, "donavon.west" <donavonwest@> wrote:
        > >
        > > But the fact remains that undefined is NOT a reserved word yet JSLint erroneously reporting that it is. What I'm doing in the example given (which you call sloppy code) works perfectly fine, is becoming a common practice and JSLint should allow it.
        > >
        >
        > Sounds like you use JSLint as a syntax checker. Equally important is JSLint's ability to define a safe, reliable, readable subset of JavaScript. Excluding variable names like "undefined" fits into this category of unsafe practices, like excluding "exec()".
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.