let str1 = '123';
let val = str1.padStart(6, '0');
console.log(val); // "000123"
let val2 = str1.padStart(6, '*');
console.log(val2); // "***123"
//The padStart() method pads the current string with another string
//(multiple times, if needed) until the resulting string reaches the given
const hours='2'
console.log(hours.padStart(2, 0))
//console '02'