gtap-dev / javascript

JavaScript Style Guide
MIT License
0 stars 0 forks source link

16.2 - vote or "else" #13

Closed mjomble closed 3 years ago

mjomble commented 3 years ago

I personally prefer

if ... {
  ...
}
else {
  ...
}

but I've adopted

if ... {
  ...
} else {
  ...
}

as it's the convention here, which has given me the impression that this is preferred by most developers here.

However, maybe there's actually a bunch of others who feel the same 😄

To find that out, we could do another vote:

React with 🚀 if you prefer else on a separate line (first example) React with 👀 if you prefer else on the same line as the preceding } (second example)

mjomble commented 3 years ago

The people have spoken 😄