The Math round() static method returns the value of a number rounded to the nearest integer.

    
    console.log(Math.round(0.9));
    // 1

    console.log(Math.round(5.5));
    // 6

    console.log(Math.round(5.05));
    // 5

    console.log(Math.round(-5.05));
    // -5

    console.log(Math.round(-5.5));
    // -5

    console.log(Math.round(-5.95));
    // -6