title: HTML select option with EJS
body: <p>I'm making a configuration for my web application, try to rendering it to web page. Below is part of my code. I want to the option selected to the <code>config[0].volume</code> has. So, if <code>config[0].volume</code> is '50', The selected option will be '50'. The codes are working well. But I wondered. 'How can I shorten this code?' So verbose with my code.</p>
  
  <pre><code>&lt;select id="volume"&gt;
  
    &lt;option value="1" &lt;%= config[0].volume == '1' ? 'selected' : ''%&gt;&gt;1&lt;/option&gt;
    &lt;option value="5" &lt;%= config[0].volume == '5' ? 'selected' : '' %&gt;&gt;5&lt;/option&gt;
    &lt;option value="10" &lt;%= config[0].volume == '10' ? 'selected' : '' %&gt;&gt;10&lt;/option&gt;
    &lt;option value="50" &lt;%= config[0].volume == '50' ? 'selected' : '' %&gt;&gt;50&lt;/option&gt;
    &lt;option value="75" &lt;%= config[0].volume == '75' ? 'selected' : '' %&gt;&gt;75&lt;/option&gt;
    &lt;option value="100" &lt;%= config[0].volume == '100' ? 'selected' : '' %&gt;&gt;100&lt;/option&gt;
  
  &lt;/select&gt;
  </code></pre>
  
  <p>I think about 2 hours, but nothing comes up. Maybe I have to use jQuery or JavaScript, and add attribute to has it, </p>
  
  <pre><code>attr('selected')... ?
  </code></pre>
  
  <p>I have no idea, could you help me?</p>