Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Javascript
how to set precision in javascript
Naftali Waxman
Programming language:
Javascript
2021-07-10 13:26:33
0
Q:
how to set precision in javascript
Zana
Code:
Javascript
2021-06-24 12:55:58
var num = 13.3714; var n = num.toPrecision(2); // 13 var m = num.toPrecision(3);//13.4
1
Tags
java
javascript
set
how
Related
convert to float in javascript
setinterval nodejs
javascript percent to int
javascript bigint
round a number to higher integer javascript
javascript convert float to int
jacvascript parse float
javascript format float
javascript quick float to integer
javascript interval fixed number of times
javascript round to nearest integer
javascript fixed precision
convert int to float in javascript
random int from interval javascript
javascript float to int
intval js
int cating javascript
round down the number javascript
New to Communities?
Join the community