Solución
solution.tsTypeScript
export function greetUser(name: string, title?: string): string {
// Hace que title sea un parámetro que no sea obligatorio
// Cuando title existe, retorna title + " " + name
// Cuando no existe, retorna solo name
return title ? `${title} ${name}` : name;
}0respuestas