showing results for - "delete backspace on string js"
Jacobo
16 May 2020
1// str1 your string with backspace 
2var str1 = 'Hello world xd lol'
3var str2 = ''
4// str2 string without empty 
5str2 = str1.replace(/\s/g, '')
6console.log(str2)
7// "Helloworldxdlol"
8