String.prototype.padStartbeginner'5'.padStart(3, '0') // β '005'
'hi'.padStart(5, '-') // β '---hi'
'hello'.padStart(3) // β 'hello'Use padStart() to pad the beginning of a string with a fill character until it reaches the target length.
Pass a custom fill string to pad with something other than spaces or zeros.
Challenge: Implement padStars(str, len) that pads the start with '*'.
padStars('hi', 5) // β '***hi'