Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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"
 
PREVIOUS NEXT
Tagged: #javascript #remove #space #string
ADD COMMENT
Topic
Name
1+1 =