About 2,660,000 results
Open links in new tab
  1. Math.round () - JavaScript | MDN

    Jul 10, 2025 · The Math.round() static method returns the value of a number rounded to the nearest integer.

  2. Math.Round Method (System) | Microsoft Learn

    Rounding involves converting a numeric value with a specified precision to a value with less precision. For example, you can use the Round (Double) method to round a value of 3.4 to …

  3. JavaScript Math round () Method - W3Schools

    Description The Math.round() method rounds a number to the nearest integer. 2.49 will be rounded down (2), and 2.5 will be rounded up (3).

  4. JavaScript Math round () Method - GeeksforGeeks

    Sep 16, 2024 · Example 1: To round off a number to its nearest integer. Example 2: The Math.round () method itself rounds off a negative number when passed as a parameter to it. …

  5. How to round float numbers in javascript? - Stack Overflow

    I need to round for example 6.688689 to 6.7, but it always shows me 7. My method: Math.round (6.688689); //or Math.round (6.688689, 1); //or Math.round (6.688689, 2); But result always is …

  6. JavaScript Math round () - Programiz

    Math.round() returns the value of the number rounded to the nearest integer as follows: If the fractional portion > 0.5, x is rounded to integer with higher absolute value.

  7. JavaScript Math round () Method: Rounding to Nearest Integer

    Feb 6, 2025 · A comprehensive guide to the JavaScript Math.round () method, covering its syntax, usage, and practical examples for rounding numbers to the nearest integer.

  8. Demystifying JavaScript‘s Math.round () Method – TheLinuxCode

    Dec 27, 2023 · Math.round() looks at each decimal individually to round up or down. This allows Math.round() to return the nearest, most accurate integer representation of the original decimal …

  9. JavaScript Demo: Math.round ()

    // Expected output: 1 console.log (Math.round (5.95), Math.round (5.5), Math.round (5.05)); // Expected output: 6 6 5 console.log (Math.round (-5.05), Math.round (-5.5), Math.round ( …

  10. JavaScript Math.round () Method: A Comprehensive Guide

    The Math.round() method is a powerful tool that simplifies the process of rounding numbers to the nearest integer. This blog post will dive deep into the Math.round() method, covering its …