Solución
solution.tsTypeScript
export function areAnagrams(first: string, second: string): boolean {
const firstTextoToLowerCase = first.trim().toLowerCase().replace(" ", '')
const secondTextToLowerCase = second.trim().toLowerCase().replace(" ", '')
if (firstTextoToLowerCase.length != secondTextToLowerCase.length) return false
for (let firstText of firstTextoToLowerCase) {
if (!secondTextToLowerCase.includes(firstText)) return false
}
return true
}0respuestas