Skip to content

Commit 5f845cc

Browse files
committed
Iteration ironhack-labs#7 complete.
1 parent b55b025 commit 5f845cc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/functions-and-arrays.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,15 @@ const wordsCount = [
144144
'matter'
145145
];
146146

147-
function howManyTimes() {}
147+
function howManyTimes(arr, word) {
148+
let words = [];
149+
arr.map((eachWord) => {
150+
if(eachWord == word) {
151+
words.push(eachWord);
152+
}
153+
})
154+
return words.length;
155+
}
148156

149157

150158

0 commit comments

Comments
 (0)