title: jQuery: Repeating Records using for loop array.length
body: <p>I think I am getting a logic problem using jQuery to fetch record from a service API with AJAX and using following piece of code.</p>
  
  <p>There is no error but this code is repeating records in HTML table (Drafts) -
   like twice.</p>
  
  <pre><code>success: function (data) {
    if (data) {
      console.log(data);
      var textDraft = "";
      for (var i = 0; i &lt; data.TableDrafts.length; i++) {
        textDraft += "&lt;tr&gt;&lt;td&gt;" + data.TableDrafts[i].nMBM + "&lt;/td&gt;&lt;td&gt;" + data.TableDrafts[i].nMTM + "&lt;/td&gt;&lt;td&gt;" + data.TableDrafts[i].sType + "&lt;/td&gt;&lt;/tr&gt;";
        $("#Drafts").append(textDraft);
      }
    }
  }
  </code></pre>