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...
Popular Articles by this blogger
- Identify the font in the Image

- Two-way Data Binding in Angular 2 and JavaScript/ES5 – Creating a simple login form

- Walkthrough with null and undefined in JavaScript

- How to move an object on the HTML5 canvas

- JQuery multiple files upload in asp.net and C# using Ajax form

- HTML 5: Draw the Grid lines on the Canvas

- Six tips to stay safe online

- Samsung Galaxy J2 2017-features, specifications and review
