• Returns a number rounded to the number of decimal places provided. Reference: https://stackoverflow.com/a/15762794

    Returns

    The rounded number.

    Parameters

    • n: number

      The number to round.

    • Optional digits: number

      The number of decimal places to round to.

    Returns number