Strings In Depth6 / 18
Up next

Pad to a width

// padStart/padEnd fill up to a target length
console.log("42".padStart(5, "0"));
console.log("hi".padEnd(6, "."));
What you're solving

padStart and padEnd