Use the `Math.round()`

function to round the result to the nearest integer.

### Related Contents:

- Which equals operator (== vs ===) should be used in JavaScript comparisons?
- What is the !! (not not) operator in JavaScript?
- How to round to at most 2 decimal places, if necessary?
- Formatting a number with exactly two decimals in JavaScript
- Is there a “null coalescing” operator in JavaScript?
- Question mark and colon in JavaScript
- What is the difference between the `=` and `==` operators and what is `===`? (Single, double, and triple equals)
- What is the JavaScript >>> operator and how do you use it?
- JavaScript plus sign in front of function expression
- Why does JavaScript handle the plus and minus operators between strings and numbers differently?
- What does = +_ mean in JavaScript
- What do these JavaScript bitwise operators do?
- Are Variable Operators Possible?
- Javascript: operator overloading
- Why does (0 < 5 < 3) return true?
- How to round up a number in Javascript?
- How do you round to 1 decimal place in Javascript?
- javascript i++ vs ++i [duplicate]
- Javascript: formatting a rounded number to N decimals
- What does the ^ (caret) symbol do in JavaScript?
- What is the instanceof operator in JavaScript?
- How can I round a number in JavaScript? .toFixed() returns a string?
- What is the !! (not not) operator in JavaScript?
- Get decimal portion of a number with JavaScript
- Is there a way to round numbers into a reader friendly format? (e.g. $1.1k) [closed]
- When to use the double not (!!) operator in JavaScript
- How to round float numbers in javascript?
- Gaussian/banker’s rounding in JavaScript
- How does !!~ (not not tilde/bang bang tilde) alter the result of a ‘contains/included’ Array method call?
- JavaScript comparison operators: Identity vs. Equality
- In jQuery, what’s the best way of formatting a number to 2 decimal places?
- How do I round a number in JavaScript?
- Round number up to the nearest multiple of 3
- Why does a shift by 0 truncate the decimal?
- What is the difference between the = and == operators, and what is ===?
- Javascript: Round up to the next multiple of 5
- Rounding numbers to 2 digits after comma
- spread operator vs array.concat()
- How do you round to one decimal place in JavaScript?
- How to round up a number to a precision of tenths in Javascript?
- Can I use chained comparison operator syntax? [duplicate]
- What is the difference between != and !== operators in JavaScript?
- Understanding Incrementing
- How does !!~ (not not tilde/bang bang tilde) alter the result of a ‘contains/included’ Array method call?
- What do “>>” and “
- && operator in Javascript
- How can I round down a number in Javascript?
- What is “?:” notation in JavaScript?
- Round a float up to the next integer in javascript
- Is it possible to create custom operators in JavaScript?