js method

The toFixed() method rounds a Number to the specified number of decimal places.

 NumberObject.toFixed(num)

num is required. Specifies the number of decimal places, which is a value between 0 and 20, including 0 and 20. Some implementations may support a larger range of values. If this parameter is omitted, 0 will be used instead.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324784499&siteId=291194637