DEV Community

loading...

Discussion on: If (all) else is complicated, switch to switch?

Collapse
ms_yogii profile image
Yogini Bende

I totally agree with the first point. If you have truthy and falsy value you should prefer if but for long strict conditions, switch can be preferable.

Forem Open with the Forem app