We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61995f1 commit 6b82e3bCopy full SHA for 6b82e3b
src/functions-and-arrays.js
@@ -160,9 +160,18 @@ const wordsCount = [
160
'matter'
161
];
162
163
-function howManyTimes() {}
+function howManyTimes(wordsCount, searchWord) {
164
+let totalApear=0;
165
166
+for(let c of wordsCount){
167
+ if(searchWord===c){
168
+ totalApear+=1;
169
+ }
170
+} console.log(totalApear);
171
+
172
+}
173
174
+howManyTimes(wordsCount, 'matter');
175
176
// Iteration #8: Bonus
177
const matrix = [
0 commit comments