Skip to content

Commit b55b025

Browse files
committed
Iteration ironhack-labs#6 complete.
1 parent dbc68ca commit b55b025

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/functions-and-arrays.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ function uniquifyArray(arr) {
122122
// Iteration #6: Find elements
123123
const wordsFind = ['machine', 'subset', 'trouble', 'starting', 'matter', 'eating', 'truth', 'disobedience'];
124124

125-
function doesWordExist() {}
125+
function doesWordExist(arr, word) {
126+
if(arr.length === 0) return null;
127+
return arr.includes(word);
128+
}
126129

127130

128131

0 commit comments

Comments
 (0)