DEV Community

Discussion on: An if else alternative

Collapse
punund profile image
punund

Ever heard of "switch"?

Collapse
miteshkamat27 profile image
Mitesh Kamat Author

Yeah heard of and this could also be an alternative to switch case. I know switch case has better performance time than this alternative.