how to remove space when removing an element with javascript code example Example: js remove space from string string.split(" ").join("")