Answers for "JS toString adds backslash"

0

JS toString adds backslash

var x = "<div class=\\\"abcdef\\\">";
x = x.replace(/\\"/g, '"');
document.body.appendChild(
  document.createTextNode("After: " + x)
);
Posted by: Guest on July-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language