Skip to content

Commit c1f0c75

Browse files
committed
Updates 'src/callbacks.js'
1 parent cd4885d commit c1f0c75

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/callbacks.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ const multiplyNums = (x, y, cb) => {
2828
const contains = (item, list, cb) => {
2929
// contains checks if an item is present inside of the given array/list.
3030
// Pass true to the callback if it is, otherwise pass false.
31-
cb(list.contains = item);
32-
return ('item not present');
31+
cb(list.contains === item); // failed because I used '=' instead of '==='
32+
// return ('Item not found'); // failed because I returned string instead of boolean
33+
return (false); // failed 1) because
34+
3335
};
3436

3537
/* STRETCH PROBLEM */

0 commit comments

Comments
 (0)