May 2008
Intermediate to advanced
172 pages
4h 54m
English
JSLint expects that if and for statements will be made with blocks—that is, with
statements enclosed in braces ({}).
JavaScript allows an if to be written like
this:
if (condition)
statement;That form is known to contribute to mistakes in projects where many programmers are working on the same code. That is why JSLint expects the use of a block:
if (condition) {
statements;
}Experience shows that this form is more resilient.