diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-if-an-object-has-a-property.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-if-an-object-has-a-property.english.md index 5fff574223..f2857cb35b 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-if-an-object-has-a-property.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-if-an-object-has-a-property.english.md @@ -76,7 +76,12 @@ console.log(isEveryoneHere(users)); ```js function isEveryoneHere(obj) { - return users.hasOwnProperty('Alan', 'Jeff', 'Sarah', 'Ryan'); + return [ + 'Alan', + 'Jeff', + 'Sarah', + 'Ryan' + ].every(i => obj.hasOwnProperty(i)); } ```