I have a f function similar to
function f(str){ alert("abc"+str); }
Now I want to use the special JavaScript script "\ b" JavaScript in such a way that I can choose whether I want to display the hardcoded string "abc" or not. For example,
f("\b\b"+"yz");
I tried the same, but it does not work. In other words, I want to concatenate a string with a backspace character so that I can remove the last characters from the string.
Can we do this in JavaScript?
EDIT The actual code is too large (its huge liner, which combines many lines). To display this in the above example, we cannot edit the function f, so do whatever you want from the external function f.
riship89
source share