Answers for "remove all type of spaces in js"

2

javascript remove all spaces from string

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

javascript remove all spaces

var string = "Javascript is fun";
var newString = string.replace(" ", "_");
console.log(newString); // Javascript_is_fun
Posted by: Guest on June-19-2021

Code answers related to "remove all type of spaces in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language