We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a6e6f9 commit 42a2aaeCopy full SHA for 42a2aae
Sprint-2/implement/contains.js
@@ -2,7 +2,7 @@ function contains(obj, targetKey) {
2
if (obj.constructor !== Object) {
3
throw new Error("Invalid Parameter");
4
}
5
- return Object.keys(obj).includes(targetKey);
+ return Object.hasOwn(obj, targetKey);
6
7
8
module.exports = contains;
0 commit comments