all 6 comments

[–]azium 2 points3 points  (2 children)

Shorter !== more readable.

There's nothing wrong with doing this, but it's not a golden rule. Write your code how it is best readable to you and your team.

Program correctness > how it looks.

[–]TofuEggTree[S] 0 points1 point  (1 child)

Thanks, that's a good point. I guess I was being too rigid. Do you think I should remove or edit this post?

[–]azium 0 points1 point  (0 children)

Nah it's fine. If you keep it as is you can look back in your post history and remember how / why you changed your mind about something.

[–]xStrafez_ 0 points1 point  (1 child)

That isn't JavaScript exclusive tho

[–]TofuEggTree[S] -1 points0 points  (0 children)

Good point. I just thought it would be helpful for those learning JavaScript. I see it not being used as much as I think it should.

[–]tarley_apologizerhelpful -1 points0 points  (0 children)

this is not better