javascript replace character with space code example
Example 1: javascript replace all spaces
var str = 'a b c';
var replaced = str.split(' ').join('_');
Example 2: javascript string spaces replace with %20
string.replace()
var str = 'a b c';
var replaced = str.split(' ').join('_');
string.replace()