title: how can i simplify a loop
body: <p>Here is a for loop. I am trying to simplify it (as in downgrade and take out the loop(s) for ease of use).
  Not sure how to--can someone explain?</p>
  
  <pre class="lang-js prettyprint-override"><code>if (myBox.length &gt;= i) {
      var smile = '';
      for (var x = 0; x &lt; myBox[i].myRating; x++) {
          smile = smile + '&lt;span&gt;☺&lt;/span&gt;';
      }
      $('#table').append('&lt;tr&gt;&lt;td&gt;' + myBox[i].Title + smile + '&lt;/td&gt;&lt;tr&gt;');
  }
  </code></pre>