const familyNames = ["Jordan", "Tiffany", "Kristine"];
// let capitalizedNames: string[] = [];
// for (var i = 0; i < familyNames.length; i++) {
// capitalizedNames.push(familyNames[i].toUpperCase())
// }
// console.log(capitalizedNames)
const capitalizedNames = familyNames.map((name: string) => (name.toUpperCase()))
const capitalizedNames2 = familyNames.map((name: string) => {
if (name === "Tiffany") {
return name.toUpperCase()
} else {
return name.toLowerCase()
}
})
console.log(capitalizedNames2)
To embed this project on your website, copy the following code and paste it into your website's HTML: