title: How to grab substring before a specified character in JavaScript?
body: <p>I am trying to extract everything before the ',' comma. How do I do this in JavaScript or jQuery? I tried this and not working..</p>
  <pre class="lang-none prettyprint-override"><code>1345 albany street, Bellevue WA 42344
  </code></pre>
  <p>I just want to grab the street address.</p>
  <pre class="lang-js prettyprint-override"><code>var streetaddress= substr(addy, 0, index(addy, '.')); 
  </code></pre>