title: Getting the last word from a string in Javascript
body: <p>How can we get the last word from a string using JavaScript / jQuery? </p>
  
  <p>In the following scenario the last word is "Collar". The words are separated by "-".</p>
  
  <pre><code>Closed-Flat-Knit-Collar
  Flat-Woven-Collar
  Fabric-Collar
  Fabric-Closed-Flat-Knit-Collar
  </code></pre>