Clicksco / Front-End

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

You MUST name your Behavior properties and methods using Camel Case #60

Closed BenjaminRCooper closed 10 years ago

BenjaminRCooper commented 10 years ago

This allows for consistency and better readability, as it is considered a convention within JavaScript to use Camel Case when naming any custom properties or methods.

Example

var myCustomProperty = "Some Text";

var myCustomMethod = function(myCustomParameter) {
    alert(myCustomParameter);
}
timgale commented 10 years ago

+1

jonspark commented 10 years ago

+1 for methods, +1/-1 for properties... prefer to use underscores for vars/properties/params

BenjaminRCooper commented 10 years ago

Gotta disagree mate, underscores is a PHP convention, and it is more consistent to use camelCase I feel.

Thoughts?

Ben

lewismorris commented 10 years ago

+1

ampersarnie commented 10 years ago

+1

I've always used camelCase in JS and not sure I've come across underscores being used, so I'd happily stick with this suggested standard.

jonspark commented 10 years ago

Non-issue Benji. Happy either way. Just don't currently as it feels like capitalising them gives them too much importance.

BenjaminRCooper commented 10 years ago

Are you cool for us to stick with camelCase mate?

Ben

jonspark commented 10 years ago

Yeah.

markgoodyear commented 10 years ago

+1 for camelCase too.

BenjaminRCooper commented 10 years ago

Thanks mate

timgale commented 10 years ago

+1

BenjaminRCooper commented 10 years ago

Implemented