Clicksco / Front-End

Organisation Front End Documentation & Tooling
http://docs.clicksco.com/frontend
2 stars 1 forks source link

You SHOULD always use one var statement when declaring multiple variables #62

Closed BenjaminRCooper closed 10 years ago

BenjaminRCooper commented 10 years ago

This allows for better readability and reduces the number of characters you are required to type.

Bad Example

var myFirstVariable = "First Variable";
var mySecondVariable = "Second Variable";

Good Example

var myFirstVariable = "First Variable",
    mySecondVariable = "Second Variable";
timgale commented 10 years ago

+1

I presume your intention was to add a comma at the end of the first line in place of the semicolon?

BenjaminRCooper commented 10 years ago

Copy and paste job ;)

Updated mate :)

Ben

iamrossgrant commented 10 years ago

+1

jonspark commented 10 years ago

+1

ampersarnie commented 10 years ago

+1

markgoodyear commented 10 years ago

+1

BenjaminRCooper commented 10 years ago

Implemented