Answers for "js remove all spaces until character"

13

js remove space before string

var str = "  Some text ";
str.trim();
// str = "Some text"
Posted by: Guest on May-27-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 "Javascript"

Browse Popular Code Answers by Language