06-06-2021 12:30 PM
hi there,
I need to compare 2 values, example as below. either adding zeroes or removing zeroes.
44.5500
44.55
how can I achieve this?
Thanks
Manohar
06-06-2021 01:31 PM
Hi @manohar,
You can use the “.toPrecision()” method, where you can add an argument on how may digits you want in your number. Example:
parseFloat(44.55).toPrecision(6) gives you :
I hope this helps,
Regards
Bojan
06-06-2021 02:14 PM