DEV Community

Discussion on: If/else or just if?

Collapse
 
lysofdev profile image
Esteban Hernández

I'd use the second for simple conditions and as 'guards', mentioned below. The more verbose if/else if/else would be used for more verbose conditions.