Rounding the result of division in Javascript

前端 未结 3 1324
南旧
南旧 2021-01-21 02:16

I\'m performing the following operation in Javascript:

0.0030 / 0.031

How can I round the result to an arbitrary number of places? W

3条回答
  •  臣服心动
    2021-01-21 02:25

    The largest positive finite value of the number type is approximately 1.7976931348623157 * 10308. ECMAScript-262 3rd ed. also defines Number.MAX_VALUE which holds that value.

提交回复
热议问题