javascript - I want to compare 2 decimals to see which one is greater -


i want compare 2 decimals see 1 greater.

this doesn't seem working decimals , works integers (e.g. 1 > 2) , doesn't work floats (1.67 > 1.98).

this example doesn't work:

this.testorder = (vala, valb): boolean => {     const radix = 10;     return parseint(vala, radix) > parseint(valb, radix); }; 

use parsefloat instead of parseint.

parseint takes integer part of string.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -