Strings In Depth14 / 18
Up next

Pad

const n = "42";
// pad to width 5 with leading zeros
console.log(n.padStart(5, "0"));
console.log("x".padEnd(4, "."));
What you're solving

padStart and padEnd to a width