Answers for "js formatted number"

PHP
1

javascript number format

var x = parseFloat('9.656');

x.toFixed(0);           // returns 10
x.toFixed(2);           // returns 9.66
x.toFixed(4);           // returns 9.6560
x.toFixed(6);
Posted by: Guest on June-23-2021

Browse Popular Code Answers by Language