Code to go logo
Created using Figma
Use Cases
Contribute
How to round a number in JavaScript
Numbers
By Jad Joubran ·
Last updated Feb 18, 2020
const number = 4.7138; Math.round(number);
5
Feb 18, 2020
1
Jad Joubran
See answer
1
Jad Joubran
Math.round
on MDN
Learn JavaScript step by step