From fa1f7a6cd0529797c929db7a5f44f6928b3b531c Mon Sep 17 00:00:00 2001 From: Gabriel Gomes Date: Mon, 31 Oct 2022 14:00:03 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20Adiciona=20o=20c=C3=B3digo=20do=20desaf?= =?UTF-8?q?io=208?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 08-isAnagram/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/08-isAnagram/index.js b/08-isAnagram/index.js index 918308a..1c82f70 100644 --- a/08-isAnagram/index.js +++ b/08-isAnagram/index.js @@ -1,4 +1,6 @@ export function isAnagram(word1, word2) { // implementar logica aqui - + var y = word1.toLowerCase().split("").sort().join(""), + z = word2.toLowerCase().split("").sort().join(""); + return (z === y) ? true : false; } \ No newline at end of file