Skip to content

Commit ad1fa96

Browse files
committed
Iteration ironhack-labs#6: Find elements
1 parent 0f238c6 commit ad1fa96

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

starter-code/src/functions-and-arrays.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ const wordsFind = [
9191
'truth',
9292
'disobedience'
9393
];
94+
function doesWordExist ( wordsArr, wordSearch ) {
95+
return wordsArr.includes(wordSearch)
96+
}
9497

9598
// Iteration #7: Count repetition
9699
const wordsCount = [

0 commit comments

Comments
 (0)