get int in Javascript

{Code}

alert(Math.floor(3.14));//3
alert(Math.ceil(3.14));//4
alert(Math.round(3.14));//3
alert(Math.round(3.5));//4