Coderwall
Ruby
Python
JavaScript
Front-End
Tools
iOS
More
Tips
Ruby
Python
JavaScript
Front-End
Tools
iOS
PHP
Android
.NET
Java
Jobs
Jobs
Sign In or Up
Joined December 2016
·
GregKass
GregKass
Senior JavaScript Developer at DoubleVerify
·
New York
·
·
0 Protips
1 Comments
Posted to
Consider lookup tables instead of switch or if/else
over 1 year ago
In the case of integer conditions, particularly consecutive, you could just use a lookup array.
Achievements
1 Karma
0 Total ProTip Views
Interests & Skills
mostly JS and front end
In the case of integer conditions, particularly consecutive, you could just use a lookup array.