-4

44571.123 * 75.46 = 3363336.94158, But I want the value 3363336.942. So do i write code in java script

Sourabh
  • 73
  • 8

1 Answers1

0

You can use the toFixed() function like so:

var sum = (44571.123 * 75.46);
var decimal = sum.toFixed(3);

with 3 being the number of decimal places that you want.

Daniel Hutton
  • 1,455
  • 1
  • 17
  • 33