JavaScript braces on new line or not? [closed]
At work, we place braces on the next line, but at home, I do the opposite. Which one do you prefer? (K&R vs OTBS) function something() { // ... } function something() { // ... } A lot of JavaScript libraries seem to use the OTBS (one true brace style). I'd like to follow them for consistence among other JavaScript projects, but doesn't K&R style look more readable? Note: We know the problem with return and braces in JavaScript, that will always be an exception. However, that is only a single case. This is a Holy War to which you will never get a usable answer! Just stick with whatever everyone