remove multiple spaces from string in js code example
Example: javascript remove space from two side of string
const string = " this contains spaces ";
string.replace(/\s{2,}/g, '').trim()
const string = " this contains spaces ";
string.replace(/\s{2,}/g, '').trim()