DEV Community

Discussion on: 1 line of code: How to check if an Array is empty

Collapse
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

I disagree. I've run into this trap so many times myself and then still had to go back and add a console statement or debugger. Same issue with early-return statements that don't have braces, especially if you have multiple ones. It's useful to know when/if you've landed in a particular scope at all.

Some comments have been hidden by the post's author - find out more