// Add "0" to the beginning until the length of the string is 8.consteightBits='001'.padStart(8, '0')
console.log(eightBits) // "00000001"//Add " *" at the end until the length of the string is 5.constanonymizedCode="34".padEnd(5, "*")
console.log(anonymizedCode) // "34***"
// This shows an alternative wayletword="apple";
constcharacters= [...word];
characters[0] =characters[0].toUpperCase();
word=characters.join("");
console.log(word); // "Apple"
consttext="I like apples. You like apples."console.log(text.replace(/apples/g, "bananas"));
// "I like bananas. You like bananas."console.log(text.replaceAll("apples", "bananas"));