Math Object
alert(Math.floor(1.8))
- floor() - retuns 1 - the number rounded down.
alert(Math.ceil(1.2))
- max() - retuns 2 - the number rounded up.
alert(Math.round(1.5))
- round() - retuns 2 - the number rounded.
alert(Math.round(1.4))
- round() - retuns 1 - the number rounded.