.padStart(num,val)

Description

Padstart returns the original string with the start padded out using the input values

Parameters

Padstart needs the number of characters to pad the input out to and the string to use to pad the input with

Usage On Strings

num = "1"

log num.padStart(10,"0")
// 0000000001

Last updated