Answers for "use forward slash in javascript string"

2

replace backward slash in javascript

const data = { "\\id\\": "\\23232\\", "\\pass\\": "\\1434\\" };
console.log(data);
const b = JSON.stringify(data);
str = b.replace(/\\/g, '');
console.log(str);
Posted by: Guest on May-21-2021
1

javascript regex escape forward slash

// use a backslash to escape reserved characters including the forward slash
/\//
Posted by: Guest on May-26-2021

Code answers related to "use forward slash in javascript string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language