Answers for "how to remove all spaces in a string typescript"

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 "how to remove all spaces in a string typescript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language