const number = 5;
console.log(number.toString().padStart(2, '0')); // expected output: "05"
const str1 = '5';
console.log(str1.padStart(2, '0')); // expected output: "05"
function pad(num, size) {
num = num.toString();
while (num.length < size) num = "0" + num;
return num;
}