Solución

@duron03·5/9/2026TypeScript
solution.tsTypeScript
export function swapCase(text: string): string {
  let res: string = ''
  for (let i: number = 0; i < text.length; i++) {
    const currLetter: string = text[i];
    if (currLetter.toLowerCase() === currLetter) res += currLetter.toUpperCase();
    else res += currLetter.toLowerCase();
  }
  return res;
}
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.