Tell us what’s happening:
I don’t know how to solve this. I’ve been on this test for far too long. Can someone help?
Your code so far
function whatIsInAName(collection, source) {
var sourceKeys = Object.keys(source);
var arr = collection.filter(function (val, j){
return val.hasOwnProperty(sourceKeys[j]) === true && val[sourceKeys[j]] === source[sourceKeys[j]];
});
return arr;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/wherefore-art-thou