Display the number with floating point without rounding in JavaScript

Top Post on IndiBlogger
0

Sometime you need to display the result with floating points of the some mathematical calculation without rounding off such as you have the value 12.56667, you want to display 12.56. This is useful when you are playing with Currency. The following code snippets can be use to truncate values without rounding. Method 1: Use Math.trunc(x) … Continue reading "Display the number with floating point without rounding in JavaScript" The post Display the number with floating point without rou...

Read this post on authorcode.com


Hirendra sisodiya

blogs from Noida