every time i use the Math.round(4.45678765e-6 * 10000)/10000 it gives me a 0 value but if i remove the e-6 it gives the correct answer 4.4567 what shoul i do? here\'s my code. t
You can use -
var x = Number((4.45678765 * 10000)/10000).toFixed(5);
The toFixed( ) will restrict your value to those digits after decimal point.
toFixed( )