Most Efficient Coding Style For Forms With Multiple Radio Buttons
I am have a form that look something like this: I want the input.variable I am going to throw into localStorage based on the number of boxes filled out and the radio boxes checked
Solution 1:
Ok, since my comment seems to have pointed you in the right direction, I'm pasting it here as an answer:
if you want a clean way to arrange data, use an object literal. If you're dealing with a wash of if elseif elseif
statements, consider using a switch
, if all conditionals check a different value, just use switch (true)
Post a Comment for "Most Efficient Coding Style For Forms With Multiple Radio Buttons"