Dave's Brain

Browse - programming tips - javascript warnings about undeclared variables

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.
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, 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.
Advertisements: