Javascript pad number with leading zeros. log(formattedNum); Output: 10.