forked from M3-Academy/challenge-algorithms-v2.0
desafio 08 concluido
This commit is contained in:
parent
906028da29
commit
35269078e8
@ -1,4 +1,10 @@
|
|||||||
export function isAnagram(word1, word2) {
|
export function isAnagram(word1, word2) {
|
||||||
// implementar logica aqui
|
// implementar logica aqui
|
||||||
|
word1 = word1.toUpperCase().split('').sort().join('');
|
||||||
|
word2 = word2.toUpperCase().split('').sort().join('');
|
||||||
|
if(word1 === word2) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user