resource / Front-End-Standards

Front-end development standards for Resource.
MIT License
23 stars 1 forks source link

Naming boolean variables? #28

Closed Krxtopher closed 11 years ago

Krxtopher commented 11 years ago

The examples in the "Booleans" section are all function names. Should boolean variables follow the same convention? If so, we should add some to the example code.

ex. var isValid = true;

nicetransition commented 11 years ago

Good point, I feel the boolean section is more of showing proper function names.

var isX = ( /*conditional*/  ) ? true : false;
if ( isX ) {
    // do something
}
var isY = true;
if ( isY ) {
    // do something
}  else {
    // do something else
}

Like those?

LukeAskew commented 11 years ago

@Krxtopher brings up a good point. I will modify the examples to show true boolean type exmaples.