title: How to get the number of lines in txt file data using jQuery
body: <p>I am trying to get the data from a txt file and I wish to get the total row of the data.</p>
  
  <p>Sample of TXT file:</p>
  
  <pre>
      data1 content1 txt1
      data2 content2 txt2
      data3 content3 txt3
      data4 content4 txt4
      data5 content5 txt5
      ...
  </pre>
  
  <p>Sample of script file: 
  </p>
  
  <pre><code>$.get(txtFile, function(data) {
  var rows = data.split('\r\n');                       
  $.each(rows, function(rowIndex, row) {
      var data = row.split('\t');
      var dataName = $.trim(data[0]).toLowerCase();
      // (more code)
  }
  </code></pre>
  
  <p>I was wondering if there are ways to get the total row of the data in text file. Thanks for the help.</p>