Solución
solution.tsTypeScript
export function swapCase(text: string): string {
return [...text]
.map(c => {
if (/[a-z]/.test(c)) return c.toUpperCase()
else if (/[A-Z]/.test(c)) return c.toLowerCase()
else return c
})
.join('');
}0respuestas