javascript
Remove decimal points in numbers
Math.trunc(inputnumber) //truncate fractional part, also see below
Math.floor(inputnumber) //round down
Math.ceil(inputnumber) //round up
Math.round(inputnumber) //round to nearest integer
Was this helpful?
Similar Posts
- add sum of numbers of given numbers
- Remove or hide tooltips on data points in Chart.js
- Create groups or categorize the axis points of highcharts.js
- Lodash - Get random number between two numbers
- Javascript program to swap two numbers without using temporary variable
- Remove last character of a string in Javascript
- Remove item from array in Javascript