loading...

re: There's no "else if" in JS VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I agree it's interesting that you can't drop the braces around function bodies (which hadn't occurred to me before) but the example in the post, of...
 

It's not.
Because we're always encouraged to use {} in some ways, and we learn by memory to use those, without knowing the why.
During the first approach to a language, you cannot be so deeply analytic, because you've to trust the rules, or you will never go on.
After the totally beginner phase, you should start to ask yourself the why.

Have you ever encountered a bug caused by missing parentheses? Being consistent improves code readability and makes it easier to identify bugs.

It's not about... DON'T USE PARENTHESES :D It's all about know the why of parentheses

code of conduct - report abuse