Dave's Brain

Browse - Programming Tips - Old - How do I get warnings about undeclared variables in javaScript?

Date: 2009jul26
Language: javaScript

Q.  How do I get warnings about undeclared variables in javaScript?

A.  In Firefox, go to

about:config
And set
javascript.options.strict = true
This is like perl's "use strict;". It also, helpfully, warns about variables with overlaping scope. Since this generates lots of warning from things I don't control (eg jQuery). I prefer to just turn it on occasionally.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.