Verification for Javascript Files
Posted Aug 26, 2004 at 12:09 AM
The thrills of victory, the agony of script errors. Especially silly syntax ones. Such can be the case in the wonderful uncompiled, type-free world of Javascript. There is hope, however. One tool I’ve used from time to time as a sanity check for the scripts I write is a tool called JSLint. Just navigate over to Douglas Crockford’s Javascript lint tool, paste in your script, and verify it.
It will take a little bit of time to become familiar with the tool, but it’s time well spent. The most important thing is to use a Javascript comment like the following to define the global functions and objects that your script depends on, but does not actually define itself:
/* global window, document, navigator, alert */
About this page
This page contains a single post from Daniel Boerner's blog, of which Boot Camp + Windows Vista = no more Airport Extreme reboots is the latest post.
Are there more posts like this one?
Possibly. Within this blog, this post is categorized under webdev and it was posted on August 26, 2004. Those would be good places to start looking for related posts.
This post is closed to new comments.