DEV Community

Discussion on: How would you refactor this JS function?

Collapse
 
whatthehanan profile image
Hanan Hamza

the easiest way to check for all falsy values would be if(!!line === false)

Thread Thread
 
rkallan profile image
RRKallan

What do you think about?

If(!line)
Enter fullscreen mode Exit fullscreen mode