// a typed helper uppercases the first letter
function capitalize(word: string): string {
if (word.length === 0) return word;
return word[0].toUpperCase() + word.slice(1);
}
console.log(capitalize("hello"));string manipulation in a typed function