I am not understanding how to solve it

its giving m errors
Describe your issue in detail here.

  **Your code so far**

function whatIsInAName(collection, source) {
var arr = [];
// Only change code below this line
for (let i = 0; i < this.length; i++) {
  if (callback(this[i]) === true) {
// 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:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36

Challenge: Wherefore art thou

Link to the challenge:

Hi @nanay !

You are missing a curly brace at the end of your if statement and for loop.

Once you fix those two errors than you are left with this error
TypeError: Cannot read property ‘length’ of undefined

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.