ASHdevelopment / standards

ASH Development Standards
28 stars 13 forks source link

if/else syntax #171

Closed ASH-Anthony closed 6 years ago

ASH-Anthony commented 6 years ago

Should if/else blocks be written as

if(condition){
 return true
}else{
  return false
}

OR

if(condition){
 return true
}
return false

I personally think the first is easier to read when the block is larger and has more code. In a basic example, like above, it doesn't make much of a difference, but the example above is not like most code.