Blank Line Usage in JavaScript

How should blank lines be used when developing in JavaScript?

In general, use blank lines to separate related lines of code from unrelated lines of code. Here are some specifics:
• Add blank lines between methods.
• Add blank lines between local variables in a method and its first statement.
• Add blank lines before multi-line or single-line comments.
• Add blank lines between logical sections inside methods.

On the whole, your code should look like a series of paragraphs.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s