i have many data like this :
3.23214215
but i want to use the 3.2
part ,
what can i do using jquery ,
thanks
yourNumber.toFixed(1);
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number/toFixed
You can use plain Javascript:
var n = 3.23214215
var fixed = n.toFixed(1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With