Solución

@kaltre10_104f340e·6/6/2026TypeScript
solution.tsTypeScript
class Person {

  constructor(public firstName:string, public lastName: string){}

  get fullName(){
    return `${this.firstName} ${this.lastName}`
  }
}

export function getFullName(firstName: string, lastName: string): string {
  // Crea una instancia de Person y retorna el getter fullName
  const person = new Person(firstName, lastName)
  return person.fullName;
}
0respuestas
Respuestas

Aún no hay respuestas

¡Sé el primero en responder!

Escribir un comentario

Recuerda ser amable. Estás comentando la solución de otra persona. Comparte tu perspectiva de forma constructiva y respetuosa.

Debes iniciar sesión para publicar un comentario.