javascript convert string to number

Javascript convert string to number

Some time we need to get number value from currency format string . This Javascript convert string to number post will show how we get the exact number value. This javascript convert string to number code can be tested at here .

Lets consider we have a string its value like $1,221.22. So the actual number is 1221.22 after eliminate the Dollar sign and comma. The javascript code is –

Leave a Reply

Your email address will not be published. Required fields are marked *