operator that replaces spaces by underscore code example
Example: javascript replace space by underscore
// replaces space with '_'
str = str.replace(/ /g, "_");
// or
str = str.split(' ').join('_');
// replaces space with '_'
str = str.replace(/ /g, "_");
// or
str = str.split(' ').join('_');