Answers for "toPrecision() returns a string, with a number written with a specified length:"

0

toPrecision() returns a string, with a number written with a specified length:

var x = 9.656;

x.toPrecision();        // returns 9.656

x.toPrecision(2);       // returns 9.7

x.toPrecision(4);       // returns 9.656

x.toPrecision(6);       // returns 9.65600
Posted by: Guest on April-24-2021

Code answers related to "toPrecision() returns a string, with a number written with a specified length:"

Browse Popular Code Answers by Language