#22 Uncaught syntax error?

closed
nobody
None
5
2007-08-02
2007-07-12
Anonymous
No

IE7 gives a syntax error messsage when there are stray commas in the source. It would be nice if these could be caught by Lint.

Here's an example:

alert("test");,

This will kill a page in IE, but won't come up in Lint.

Discussion

  • Logged In: YES
    user_id=1357599
    Originator: NO

    When I try this in the Online Lint (http://www.javascriptlint.com/online_lint.php), I get a syntax error. If I try the following code, I get a warning about the comma:

    var a;
    var b;
    a = 1, b = 2;

    Closing for now. Feel free to reopen if I overlooked something.

     
    • status: open --> closed