Open leoj3n opened 10 years ago
Yes, switch
is not a function so it should have a space before the (
. I am not a fan of inner-space, so I would write it as:
switch (foo) {
For those that do use inner-space:
switch ( foo ) {
I don't think that inner-space give more readability in the switch statement.
This is in-line with the way that functions are declared
var foo = function( bar ) {
}
switch( bar ) {
}
the style in which the switch is declared seems accurate to me.
switch
is not a function, it is a statement, so it should have the space before the paren to make this clear. Also, practically every example I could find, outside of this instance, shows the space in front of the paren.
https://github.com/rwaldron/idiomatic.js#misc
Should it be written
switch (
instead of the currentswitch(
?