Add Leading Zeros To A String In JavaScript

March 2022
const startString = '42'
const newString = startString.padStart(4, '0')
end of line