Hi all…cant really make out what’s wrong with my logic…will appreciate suggestions. thanks in advance.
if you want help, please post your code
it is really difficult to debug from a screenshot
ok…here is my code…i hope i am doing it in a proper manner…
var arr = [];
// Only change code below this line
var srcProperty = Object.keys(source);
for (var i = 0; i < srcProperty.length; i++) {
arr = collection.filter(
obj =>
obj.hasOwnProperty(srcProperty[i]) &&
obj[srcProperty[i]] === source[srcProperty[i]] &&
Object.keys(obj).length >= Object.keys(source). length);
}
//console.log(arr);
// Only change code above this line
return arr;
}
whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" }); ```
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
