&lt;nitpick&gt;According to coding standards, should be `elseif` &lt;/nitpick&gt;