javascript remove first space in string

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

let str = " aa bb    ";
console.log(str.trim()); // "aa bb"
Source

Also in JavaScript: