js remove dollar sign from string

Solutions on MaxInterview for js remove dollar sign from string by the best coders in the world

showing results for - "js remove dollar sign from string"
Michelle
12 Oct 2018
1A common problem with HTML input forms is that users tend to include dollars signs when inputting currency numbers.
2These dollars signs can be easily removed through JavaScript by using the JavaScript replace function and a simple regular expression.
3This is demonstrated in the following example:
4
5var Amount = '$13.22';
6var ReplacedAmount = Amount.replace(/\$/g,'');
7document.write(ReplacedAmount);