Convert float to integer



let pi = 3.14;
var intvalue = Math.floor( pi );
var intvalue = Math.ceil( pi );
var intvalue = Math.round( pi );

// `Math.trunc` was added in ECMAScript 6
var intvalue = Math.trunc( pi );