KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a function that I'm using to remove unwanted characters (defined as currency symbols) from strings then return the value as a number. When returning the value, I am making the following call: return parseFloat(x); The problem I have is that when x == "0.00" I expect to get 0.00 (a float with two decimals) back. What I get instead is simply 0. I've also tried the following: return parseFloat(x).toFixed(2); and still get simply 0 back. Am I missing something? Any help would be greatly appreciated. Thank you!!
Tags (comma-separated)
Save Edits
Cancel