trim leading whitespace javascript code example Example: js remove space from string string.split(" ").join("")