Is it possible to condense code to allow multiple variables instead of a line per variable?
<p>I am using a small script that adds custom selections to a dropbox using the following code</p>

<pre><code>if (typeof customsum1 != "undefined") { editsummAddOptionToDropdown(dropdown, customsum1); }
if (typeof customsum2 != "undefined") { editsummAddOptionToDropdown(dropdown, customsum2); }
if (typeof customsum3 != "undefined") { editsummAddOptionToDropdown(dropdown, customsum3); }
</code></pre>

<p>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?</p>
