Function pad2

  • Formats a number with leading zeros so the resulting string is 2 digits long. Similar to string.padStart(2, '0').

    Parameters

    • num: number

    Returns string