-1

how to round 17000595 to 17000500 with javascript?

Devisy
  • 159
  • 3
  • 12

1 Answers1

13

Here is the formula

  • Divide it by 500,
  • take its floor value
  • and multiply it by 500 again.

code is -

Math.floor(17000595/500) * 500
gurvinder372
  • 66,980
  • 10
  • 72
  • 94