Page tree
Skip to end of metadata
Go to start of metadata

A Javascript syntax checker, written itself in JavaScript. It helps a lot, in particular in bug fixing. I usually have open in a browser window while developing JavaScript code in a text editor.

You can enter any JavaScript code from the clipboard and get the following:

  • A list of problems with the code. Most of these problems are real problems. For example: Not anybody knows that it is extremely dangerous to use the parseInt() function with only one argument: If you write
    var i = parseInt( '0000015');  // Usually not good!
    Did you know that after processing this statement, the variable i will have the value 13, not 15?
    Other checks are of purely pedagogical nature. For example "eval is evil" reminds you that eval() is a highly expensive function.
  • A symbol table with all global variables. Look for suspicious names like "i" or "myLocalVariable"! Did you forget the "var" statement?
  • A cross reference table for the usage of all symbols (globals, parameters and locals) in each function. You may print it out and analyze it in detail.

A very helpful tool!

If you are interested in JavaScript, you may also have a look at the other pages by Douglas Crockford on