Home › Forums › JavaScript › jQuery Plugin Conditional Logic › Reply To: jQuery Plugin Conditional Logic
May 10, 2014 at 10:39 am
#169729
dyr
Participant
PSA:
According to this: http://jsperf.com/if-else-vs-arrays-vs-switch-vs-ternary it seems that switch statements are the most performant.
In my case I’m 99% sure the difference is negligible but it’s something to be aware of.