From 14cf4ae60944fc3ac489b63174f8f57aecf0a95e Mon Sep 17 00:00:00 2001 From: Nicolas Oliveira <110689312+thedevnicolas@users.noreply.github.com> Date: Fri, 28 Oct 2022 10:49:59 -0300 Subject: [PATCH] feat(desafio08):desafio-completo --- 08-isAnagram/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/08-isAnagram/index.js b/08-isAnagram/index.js index 918308a..62700e1 100644 --- a/08-isAnagram/index.js +++ b/08-isAnagram/index.js @@ -1,4 +1,6 @@ export function isAnagram(word1, word2) { // implementar logica aqui - -} \ No newline at end of file + word1 = word1.toUpperCase().split('').sort().join(''); + word2 = word2.toUpperCase().split('').sort().join(''); + return word1 === word2 + } \ No newline at end of file