DEV Community

Discussion on: The 10 Component Commandments

Collapse
 
andrii2019 profile image
andrii2019

What about just using
!!array.length && ...?
It looks smarter and shortly.

Thread Thread
 
ambroseus profile image
Eugene Samonenko

yep, it's shorter :) use !! many years while coding on perl. now I prefer Boolean(array.length)