easierbycode
4/29/2016 - 8:54 PM

truncates the decimal part of a number

truncates the decimal part of a number

let num = 29.9;

console.log( Math.trunc( num ) );