title: If substring in string, remove it through the end from string
body: <p>I'm trying to figure out how to do the following with javascript:<br>
  If a substring is in the string, remove from the beginning of the substring till the end of the string from the string.</p>
  
  <p>For example (pseudocode):</p>
  
  <pre><code>var mySub = 'Foo'
  var myString = 'testingFooMiscText'
  var myString2 = 'testingMisctext'
  
  var myStringEdit = //myString - (Foo till end myString)
  var myString2Edit = myString2 //(cause no Foo in it)
  </code></pre>