- Instant help with your JavaScript coding problems

Round down a number in JavaScript

Question:
How to round down a number in JavaScript?
Answer:
const num = Math.floor(12.9);

console.log(num); // 12
Description:

The Math.floor() function returns the largest integer less than or equal to a given number.

Share "How to round down a number in JavaScript?"