- Oct 17, 2008Hello,
--- In email@example.com, "Douglas Crockford" <douglas@...>
> I added a onevar option. It allows only one var statement per
>Personally I don't think this practice should be recommended.
It contradicts the related recommendation in the Code Conventions
It is preferred that each variable be given its own line and comment.
var currentEntry; // currently selected table entry
var level; // indentation level
var size; // size of table
With a single var statement, all variables will typically be defined on
the same line without comments, decreasing readability &
Suggestion: check that all var statements are grouped at the beginning
of the function. This will guarantee that scope problems are avoided,
which was the purpose of introducing onevar, as I understand it.
[Non-text portions of this message have been removed]
- << Previous post in topic Next post in topic >>