From d2ea761b4fbfaa0dc65dff8cd74a8d5d9f051775 Mon Sep 17 00:00:00 2001 From: LeonardoPereiraRocha Date: Wed, 2 Nov 2022 16:11:57 -0300 Subject: [PATCH] =?UTF-8?q?feat(09-mostRepeatedChar):=20Cria=20a=20fun?= =?UTF-8?q?=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 09-mostRepeatedChar/index.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/09-mostRepeatedChar/index.js b/09-mostRepeatedChar/index.js index b113ed8..326b356 100644 --- a/09-mostRepeatedChar/index.js +++ b/09-mostRepeatedChar/index.js @@ -1,4 +1,19 @@ export function mostUsedChar(text) { - // implementar logica aqui - return "" -} \ No newline at end of file + let arrChar; + arrChar = text.split(''); + let countCharMax = 1; + let countChar = 0; + let char; + for (let i=0; i