title: Creating a button in Javascript for each value generating in the loop
body: <p>I have a data from the back end and I have to create a button for each value generated by that time</p>
  
  <p>This is for a web page and it should display the button for each values i.e. whatever is in <code>values[i].good and values[i].bad</code></p>
  
  <pre><code>for (i in values){
    msg += values[i].good + ' - ' + values[i].end+ '&lt;br&gt;';
    $('&lt;button type&gt;',{text:values[i].good + ' - ' + values[i].bad,id : 'btn_'+ i});
  }
  </code></pre>
  
  <p>For example, if my data is (12-13,13-14)
  if <code>values[i].good</code> is 12 and <code>values[i].bad</code> is 13,then I need a button (12-13), the same thing should be repeated for all values. All button should display in the web app.</p>