Fork me on GitHub

JSLint Error Explanations

JSLint will hurt your feelings. It's time to make them better!

'{a}' is not a statement label

When do I get this error?

JSHint will throw the "'{a}' is not a statement label" error when it encounters a break or continue statement referencing a label that does not exist. In the following example we try to break out of a for loop to the example label.

This is the JSHint equivalent of the "'{a}' is not a label" error from JSLint. More detail can be found on the page for the JSLint message.

In JSHint 1.0.0 and above you have the ability to ignore any warning with a special option syntax. The identifier of this warning is W090. This means you can tell JSHint to not issue this warning with the /*jshint -W090 */ directive.

James Allardice

This article was written by James Allardice, an enthusiastic young JavaScript developer at Global Personals (we're looking for developers so please apply). He is passionate about writing clean, maintainable JavaScript and uses JSHint every day to help achieve this.

You can follow him on Twitter, fork him on GitHub and find him on Google+.

Proceeds generated by this site are donated to help advance other open source projects

comments powered by Disqus