Is this javascript syntactically correct or is there a better way?
<p>Basically if a variable isn't set then set it to another value.</p>

<p>There must be a better way, this looks so messy.</p>

<pre><code>        if ($image_src === undefined) {
                $image_src = $apple_icon;
            }

            if ($image_src === undefined) {
                $image_src = $apple_icon2;
            }

            if ($image_src === undefined) {
                $image_src = $item_prop_image;
            }

            if ($image_src === undefined) {
                $image_src = $image_first;
            }
</code></pre>
