Fix a number : Number « Javascript Objects « JavaScript DHTML






Fix a number

 
    
<html>
<body>
<button onclick="var myNum = new Number(100.22); alert(myNum.toFixed(1));">
Number toFixed
</button>
</body>
</html>

    
      
        
  








Related examples in the same category

1.Convert a number to a precision
2.Number.MAX_VALUE
3.Number.MIN_VALUE
4.Number.NEGATIVE_INFINITY
5.Number.POSITIVE_INFINITY
6.Number.toExponential()
7.Number.toPrecision()
8.Number.toFixed()
9.Convert a Number to a Exponential format