Answers for "remove backslash in string in js"

0

how to remove backslash from string in javascript

string.replace(/\\\//g, "/");

// this is also
let new_arr = arr.replace(/\\/g, "");
Posted by: Guest on February-10-2021
2

delete backspace on string js

// str1 your string with backspace 
var str1 = 'Hello world xd lol'
var str2 = ''
// str2 string without empty 
str2 = str1.replace(/\s/g, '')
console.log(str2)
// "Helloworldxdlol"
Posted by: Guest on October-20-2020

Code answers related to "remove backslash in string in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language