What does converting to a float mean?

What does converting to a float mean?

Postby admin » Tue May 23, 2017 11:59 pm

When somebody tells you that you need to convert to a float it means that a second stage or more is required to process a string. For example:

Q.- I want to remove commas from the string and calculate those amount using javascript.

For example : I have those two values -


Now I want to remove commas from those string and want the total of those amount.

A.- To remove the commas, you'll need to use replace on the string. To convert to a float so you can do the maths, you'll need parseFloat:
The AVNW Support Team

If you wish to add visual documentation (screenshots), make a donation and we'll let you know when the post has been updated

And, if our post has provided you with great information, there are a few ways you can show your appreciation:
  1. Like us on Facebook.- Our account had recently a hacking problem on FB and we were forced to create a new one. We lost all our posts & likes. :(
  2. Send us a testimonial.- Testimonials thanking for our good team work can be valuable to us and may encourage others to seek our support.
  3. Post a review.- Posting a good review about this site could also compel others to seek our advice & support.

Thank You!
User avatar
Site Admin
Posts: 452
Joined: Mon Jan 13, 2014 3:18 am
Location: New York City

Return to Support

Who is online

Users browsing this forum: No registered users and 0 guests