Skip to content

Code Conventions / Var declaration #23

@alexsantos

Description

@alexsantos

I've read your comment about Crockforf and followed the link and he also says to use var the same way as you do :-)
"It is preferred that each variable be given its own line and comment. They should be listed in alphabetical order.

var currentEntry; // currently selected table entry
var level;        // indentation level
var size;         // size of table

"
I copied this code to JSLint and it passes. Seems Crockford changed his mind :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions