title: trying to use parseFloat to get rid of ending characters
body: <p>The script returns the state name and miles i.e. <code>TN  71.6 mi</code>.  I'm trying to get rid of the <code>mi</code> by converting the string to a number which should ignore the unwanted characters. The <code>parseFloat</code> command gets completely ignored.</p>
  
  <pre><code>function compileMilesReciever(data) {
      if (data === null) {
          setTimeout(compileMiles, 6000);
      } else {
          if (compileMilesIndex == orderedLatLngs.length) {
  
              if (!stepEndState) {
                  stepEndState = startState;
              }
  
              stateMiles[stepEndState] = data.routes[0].legs[0].distance["text"];
  
              var txt = "";
              var i = 0;                   
              var x = stateMiles[state];
              parseFloat(x);
  
              for (state in stateMiles) {
                  i++;
                  $("#results").append
                  $(".state" + i).append(state);
                  $(".mile" + i).append(stateMiles[state]);
              }
  </code></pre>