To remove the percentage symbol from string, call the
replace() method and pass
/%/g and empty string
'' as parameters. The replace() method will return a new string in which all the percentage symbols are removed.
The String.replace() method accepts two parameters:
If you pass a string as a first argument to the
replace() method, it replaces the first occurrence of that string. To remove all percentage symbols in a string, pass a regular expression with the