Math.round
Rounds to the nearest integer: 3.1 becomes 3, 3.6 becomes 4.… Here’s the table to summarize the differences between them:
Math.floor
Math.ceil
Math.round
Math.trunc… This rounds up or down to the nearest value, similar to Math.round:… For fractions:
Round using Math.floor, Math.ceil, Math.trunc, Math.round or num.toFixed(precision).