title: JavaScript concat string with backspace
body: <p>I have a function f similar to</p>
  
  <pre><code>function f(str){
      alert("abc"+str);
  }
  </code></pre>
  
  <p>Now, I want to use JavaScript special charecter "\b" in such a way that I can choose if I want to display the hardcoded string "abc" or not. For example,</p>
  
  <pre><code>f("\b\b"+"yz"); //should output "ayz"
  </code></pre>
  
  <p>I tried the same, but it does not work. In other words, I want to concat a string with a backspace character so that I can remove last characters from the string.</p>
  
  <p>Can we do this in JavaScript?</p>
  
  <p><strong>EDIT</strong>
  The real code is too much big (its a HUGE 1 liner that concats many many strings). To map that in above example, we cannot edit the function f, so do whatever you want from outside function f.</p>