DEV Community

Discussion on: Keeping your code clean by sweeping out "if" statements

Collapse
 
andrewtrefethen profile image
AndrewTrefethen

I would say that in javascript you could use a simple object rather than a map. Then you will be able to avoid the performance hit and might even gain some based on the javascript engines optimization of property access.