what i want is just to show the result of a variable with just one number after the ".". i've tried toFixed and toPrecision but they round the whole number, and i want the result to be exact in:
var result = 6.853571428571428; //
$("#id").html(result); //want to show 6.8
i want to show just the "6.8", using functions like toFixed(2)
and toPrecision(2)
gives me 6.9.
also tried Math.round(number * 10) / 10
but with the same results