Home › Forums › JavaScript › jQuery Plugin Conditional Logic › Reply To: jQuery Plugin Conditional Logic
May 10, 2014 at 10:18 am
#169718
Participant
Nice Mottie, I like that change. You’ve removed two if statements which is great :D
I wonder how this sort of thing is handled in more complex situations with more configuration options. Perhaps switch statements are the logical next step?
I had considered that but it seems totally overkill for situations where there are only two options.
Also I found it slightly humorous that you linked to the ternery operators page when I’m already using a bunch of those elsewhere in the code. :) :)