javascript remove space from two side of string 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()