Welcome!

AJAX & REA Authors: John Funnell, Bob Little, Kevin Hoffman, Maureen O'Gara, Onkar Singh

Related Topics: AJAX & REA

AJAX & REA: Article

JSLint To Be a Better JavaScript Programmer

JSLint helps me to stay clear of the bad stuff, which tends to make my programs more robust

Douglas Crockford's Blog

I wrote JSLint to help me to be a better JavaScript programmer. The language is mostly good, but it has lots of kinks and traps. JSLint helps me to stay clear of the bad stuff, which tends to make my programs more robust.

One day I got an email from a JSLint user suggesting that JSLint should check for fallthru in switch statements. He argued that unintended fallthrus are a common source of errors. I argued back that sometimes fallthrus are useful, and distinguishing intentional v accidental fallthru was very hard, and the benefits of the intentionals outweighed the liabilities of the accidental. (continued . . .)

More Stories By Douglas Crockford

Douglas Crockford, an architect at Yahoo!, is an AJAXWorld regular. A technologist of parts, he has developed office automation systems, done research in games and music at Atari, and been both Director of Technology at Lucasfilm and Director of New Media at Paramount. He was the founder and CEO of Electric Communities/Communities.com and the founder and CTO of State Software, where he discovered JSON. He is interested in Blissymbolics, a graphical, symbolic language, and is developing a secure programming language.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.