I am using a small script that adds custom selections to a dropbox using the following code
if (typeof customsum1 != "undefined") { editsummAddOptionToDropdown(dropdown, customsum1); }
if (typeof customsum2 != "undefined") { editsummAddOptionToDropdown(dropdown, customsum2); }
if (typeof customsum3 != "undefined") { editsummAddOptionToDropdown(dropdown, customsum3); }
and so on. This is expandable by adding more lines, but since the variables have the same format, is there a way to condense this to theoretically allow infinite custom selections as long as the set variables follow the customsum# format?
Use an array and a loop: