title: Getting only the first value of a function
body: <p>I have a function which provides this result below.
  How do I create another function to show only the 1st result instead of all the results?</p>
  
  <pre><code> turn-left
   turn-right
   turn-left
  </code></pre>
  
  <p>The code below shows how I get the result above.</p>
  
  <pre><code>function drawTable(data) {
      for (var i = 0; i &lt; data.routes[0].legs[0].steps.length; i++) {
          drawRow(data.routes[0].legs[0].steps[i]);
      }
  }
  
  function drawRow(steps) {
      var row = $("&lt;tr /&gt;")
      $("#personDataTable").append(row);  
      row.append($("&lt;td&gt;" + steps.maneuver + "&lt;/td&gt;"));
      console.log('Added Table');     
  }
  </code></pre>
  
  <p>I have created another function which will get all the results above and place it in the html. However, I only want to get the first result instead of all the results.</p>
  
  <pre><code>function getArrows() {
      $('#personDataTable td').each(function(idx, element) { 
          var text = $(element).text();
          $('#Arrows').append(text + ' , ');
          console.log('gotArrows');
      });
  } 
  </code></pre>
  
  <p>I would want all the results for the 1st function but the 2nd function, i only want the 1st result of the 1st function.</p>