Converts the number to a string and pads on the right with val until the result reaches num characters.
val
num
val — padding string.
num — total desired length.
log 123.padEnd("0",5) // "12300"
Last updated 4 months ago