Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>you can use toFixed method of javascript more detail:</p> <p><strong>Method of Number</strong> </p> <p>Implemented in JavaScript 1.5 </p> <p>ECMAScript Edition ECMAScript 3rd Edition </p> <p><strong>Syntax</strong></p> <p>number.toFixed( [digits] )</p> <p><strong>Parameter</strong></p> <p><strong>digits</strong> The number of digits to appear after the decimal point; this may be a value between 0 and 20, inclusive, and implementations may optionally support a larger range of values. If this argument is omitted, it is treated as 0. </p> <p><strong>Returns</strong></p> <p>A string representation of number that does not use exponential notation and has exactly digits digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length. If number is greater than 1e+21, this method simply calls Number.toString() and returns a string in exponential notation.</p> <p><strong>Throws</strong></p> <p><strong>RangeError</strong> If digits is too small or too large. Values between 0 and 20, inclusive, will not cause a RangeError. Implementations are allowed to support larger and smaller values as well. <strong>TypeError</strong> If this method is invoked on an object that is not a Number.</p> <p><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/toFixed" rel="nofollow">https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Number/toFixed</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload