Solución
solution.tsTypeScript
def rot13(text: str) -> str:
result = ""
for char in text:
if "A" <= char <= "Z":
result += chr((ord(char) - ord("A") + 13) % 26 + ord("A"))
elif "a" <= char <= "z":
result += chr((ord(char) - ord("a") + 13) % 26 + ord("a"))
else:
result += char
return result0respuestas