Quantcast
Viewing latest article 2
Browse Latest Browse All 13

switch/case with string

So it will optimize to do either a regular string comparison or a hashtable.

 

The take-way being, prefer switch over if because it will optimize as your code evolves.


Viewing latest article 2
Browse Latest Browse All 13

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>