Treats the number as a string and returns a new string of length num, padded on the left with val (repeated as needed).
num
val
val — padding string.
num — total desired length.
log 7.padStart("0",3) // "007"
Last updated 3 months ago