Answers for "jquery trim"

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

jquery trim

$.trim("    hello, how are you?    ");
OUTPUT : "hello, how are you?"
Posted by: Guest on August-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language