title: why does this code change the string but again revert back to original state
body: <pre><code>function capital(b){
      let letter = b[0].toUpperCase();
      return letter + b.slice(1);
  }
  
  function correction(a){
      let place = a.indexOf('_');
      let part1 = a.slice(0, place);
      let part2 = a.slice(place+1);
      a = part1 + capital(part2);
      if (a.includes('_'))
          correction(a);
      return a;
  }
  </code></pre>
  <p>When I call <code>correction(&quot;Hey_there_How_are_you&quot;)</code>, I see in while debugging that it becomes &quot;HeyThereHowAreYou&quot; but again becomes as original string itself. What could be the problem?</p>