Remove part of string between two indexOf in javascript
<p>How can i remove from a string between two <code>indexOf</code> </p>

<p>i have this <a href="http://jsfiddle.net/minagabriel/ertcp/" rel="nofollow">jsFiddle</a></p>

<p>here is my code : </p>

<pre><code> var x = "M 178.6491699876038 23.419570090792845 C 183.6491699876038 
23.419570090792845 186.47776067057902 30.902823043098138 190.3670728596699 
     41.19229585251793 L 194.25638504876076 51.48176866193772" ; 
  var c = x.indexOf('C') ; 
  var L = x.indexOf('L') ;
  var final = x.slice (c,L) ;
  console.log(final) ;
</code></pre>

<p>this code will result in returning the removed part of the string </p>

<p><strong>QUESTION</strong> how can i return the original string after removing the part between <code>C</code> and <code>L</code> </p>

<p>​</p>
