Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery Plugin Conditional Logic Reply To: jQuery Plugin Conditional Logic

#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.