how to replace space in a string with 20 in javascript code example
Example 1: replacing each space in a string javascript
const name = 'Hi my name is Flavio'
name.replace(/\s/g, '') //HimynameisFlavio
Example 2: javascript string spaces replace with %20
string.replace()