feature/algoritmos #1
@ -1,7 +1,7 @@
|
|||||||
export function isAnagram(word1, word2) {
|
export function isAnagram(word1, word2) {
|
||||||
|
|
||||||
let palavra1 = word1.toLowerCase().split('').sort().join('');
|
let palavra1 = word1.toLowerCase().split('').sort().join('');
|
||||||
let palavra2 = word2.toLowerCase().split('').sort().join('');
|
let palavra2 = word2.toLowerCase().split('').sort().join('');
|
||||||
|
|
||||||
return (palavra1 === palavra2);
|
return (palavra1 === palavra2);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user