It works very well as it uses true parsing, not heuristics, to analyse code.
Rename the file as js2-mode.el,
Move it to a directory in your 'load-path' (~/.emacs.d/ should work),
To compile, start Emacs and run the following command:
M-x byte-compile-file js2-mode.el
Add the following to your .emacs file:
(require 'js2-mode) (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
Some features of the mode are:
Highlighting of syntax errors and doubtful structures, e.g. missing ';', and undeclared variables,
The auto-indentation system works.