Answers for "right trim javascript"

18

javascript remove all whitespaces

var spacesString= "Do I have spaces?"; 
var noSpacesString= myString.replace(/ /g,'');// "DoIhavespaces?"
Posted by: Guest on August-01-2019
0

javascript remove first space in string

//use trim() on your string. It removes first and last whitepsaces

let str = " aa bb    ";
console.log(str.trim()); // "aa bb"
Posted by: Guest on August-20-2020
0

javascript right trim

//use trim() on your string. It removes first and last whitepsaces

let str = " aa bb    ";
console.log(str.trim()); // "aa bb"
Posted by: Guest on January-01-1970

Code answers related to "Javascript"

Browse Popular Code Answers by Language