Wherefore art thou *need help*

Wherefore art thou *need help*
0

#1

Tell us what’s happening:
I need help. i don’t know what semicolon I’m missing.
I have an error for every WhatIsInAName.
It says that I’m missing a semicolon.
any and all help is appreciated.

Your code so far

function whatIsInAName(collection, source) {
  // What's in a name?
  var arr = [];
  // Only change code below this line
  whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });return [{ first: "Tybalt", last: "Capulet" }]
 
 whatIsInAName([{ "a": 1 }, { "a": 1 }, { "a": 1, "b": 2 }], { "a": 1 });return [{ "a": 1 }, { "a": 1 }, { "a": 1, "b": 2 }]
 
whatIsInAName([{ "a": 1, "b": 2 }, { "a": 1 }, { "a": 1, "b": 2, "c": 2 }], { "a": 1, "b": 2 });return [{ "a": 1, "b": 2 }, { "a": 1, "b": 2, "c": 2 }]

 whatIsInAName([{ "a": 1, "b": 2 }, { "a": 1 }, { "a": 1, "b": 2, "c": 2 }], { "a": 1, "c": 2 });return [{ "a": 1, "b": 2, "c": 2 }]
  // Only change code above this line
  return arr;
}

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

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36.

Link to the challenge:


#2

You’re missing both )s and ;s after all of your calls to whatIsInAName from within your function.

I’m not really sure what you’re trying to accomplish here though.


#3

It appears you are attempting to hard code the results that should be returned by the function whatIsInAName without actually working through an algorithm to solve the challenge. Plus, you do not appear to know how to “cheat” the challenge correctly.

You need to write out an algorithm with steps needed to actually solve the challenge without trying to hard coding the answers as your solution. Once you have something written down, please share it with us and we can see if you are on the right track.