Wherefor art thou

Why can’t i use the && operator here if we are checking if the object in the collection doesn’t have the key (and) the property value doesn’t match the value in source.

  **Your code so far**
function whatIsInAName(collection, source) {
const sourceKeys = Object.keys(source)

return collection.filter(function(obj){
  for (let i = 0; i < sourceKeys.length; i++){
    if (!obj.hasOwnProperty(sourceKeys[i])|| obj[sourceKeys[i]] !== source[sourceKeys[i]]){
      return false;
    }

  }
  return true
})

}

whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });


  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0

Challenge: Wherefore art thou

Link to the challenge:

What would your full code be if that was your if statement comparison was as you describe? Remember the instructions state that all of the name/value pairs of the source object must be present in the object collection. This means you have to look at all of the source objects in some way to be a able to tell whether or not they are present. It is possible to write such code.