Answers for "how to remove all spaces form straing js"

6

javascript remove all spaces from string

str = str.replace(/\s/g, '');
Posted by: Guest on July-22-2020
0

remove all spaces from string javascript

var name = "codepadding code  ";
// remove all white spaces single or multiple spaces
var name = name.replace(/\s/g, '');
console.log(name)
//output
//mizanurrahmanmizan
Posted by: Guest on January-14-2022

Code answers related to "how to remove all spaces form straing js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language