JavaScript editor?

I need a recommendation for a free JavaScript editor for Windows - one that supports syntax highlighting. But wait. I want one that REALLY supports syntax highlighting and can catch common syntax errors of built-in methods. For example, if I type

var hdr = document.getElementById('hdr');
var ftr = document.getElementByID('ftr');

I want the 2nd line to visibly show me I mistyped getElementById . (I ‘mistakenly’ capitalized the last letter in the 2nd line. I typed “D” when it should be “d”.) No text editor I have found can do this! Notepad++, Notepad2, Textpad, jEdit, Crimson Editor, even Dreamweaver code view - nothing catches syntax errors like that. Unless there’s a plug-in or setting I am missing.

The problem is that BOTH thise lines are valid JavaScript - the only difference is that you need to define the getElementByID method somewhere in the code - possibly in a completely different file where you define all your additional document methods.

Therefore no syntax highlighter ought to be expected to detect that as it is only an error if you don’t define the method.

The way to detect such errors is to use strict JavaScript - where the code wouldn’t even try to run if you tried to reference something that isn’t defined. Another option is to paste your code at where it will then report on all the syntax errors and bad coding practices that are contained within your code without you having to try running the script (the only checkbox you need to actually apply is “assume a browser” ).

It’s called the error console.