Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function whatIsInAName(collection, source) {
- // What's in a name?
- var arr = [];
- function checkSource(item) {
- return source.every(function(source) {
- });
- }
- // Only change code below this line
- arr = collection.filter(checkSource);
- // Only change code above this line
- return arr;
- }
- whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement