remove spaces in a string js
snippet in javascript

remove spaces in a string js

user6119

str.replace(/\s+/g, '')

removed spaces in string js

user1625

string.split(" ").join("")