how to remove space from a word in js code example
Example 1: js remove space from string
string.split(" ").join("")
Example 2: javascript remove space from string
const removeSpaces = str => str.replace(/\s/g, '');
// Example
removeSpaces('hel lo wor ld'); // 'helloworld'