Skip to content

Commit e419470

Browse files
author
Arthur
committed
return variable
1 parent 213eee2 commit e419470

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

Sprint-2/implement/contains.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ function contains(object, key) {
1212
return false;
1313
}
1414

15-
if (key in object) {
16-
return true;
17-
} else {
18-
return false;
19-
}
15+
return key in object;
2016
}
21-
17+
console.log(contains(object, "b"));
2218
module.exports = contains;
2319

2420
/*

0 commit comments

Comments
 (0)