The Math.floor() function always rounds down and returns the largest integer less than or equal to a given number.
float = 5.677;
var intvalue = Math.floor( float );
console.log(intvalue) //5
The Math.ceil() function always rounds up and returns the smaller integer greater than or equal to a given number.
float = 5.677;
var intvalue = Math.ceil( float );
console.log(intvalue) //6
The Math.round() function returns the value of a number rounded to the nearest integer.
float = 5.677;
var intvalue = Math.round( float );
console.log(intvalue)