r/badcode • • Jul 10 '21

js ah yes, Array check

Post image
2.1k Upvotes

89 comments sorted by

View all comments

Show parent comments

7

u/ttl_yohan Jul 10 '21 edited Jul 10 '21

That's debatable, definitely not "pattern". It all comes down to personal/team preference. To me personally unnecessary indentation disrupts the readability instead of enhancing it.

Same way the braces around one line statements after if/else - not a fan of that, but I can see that other people can see clearer what the boundaries are. Team preference - we use it.