DEV Community


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

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