Build a Project Idea Board - Test #17

Tell us what’s happening:

Tests 17 & 18 I can’t seem to get to pass. This is what the console is showing…

Does anyone know why this might be happening?

Thanks!

Your code so far

const projectStatus = {
  PENDING: { description: "Pending Execution" },
  SUCCESS: { description: "Executed Successfully" },
  FAILURE: { description: "Execution Failed" },
};

class ProjectIdea {
  constructor (title, description) {
    this.title = title;
    this.description = description;
    this.status = projectStatus.PENDING;
  }

  updateProjectStatus (newStatus) {
    this.status = newStatus;
  }
}

class ProjectIdeaBoard {
  constructor (title) {
    this.title = title;
    this.ideas = [];
  }

  pin (projectIdea) {
    this.ideas.push(projectIdea);
  }

  unpin (projectIdea) {
    const index = this.ideas.indexOf(projectIdea);
    this.ideas.splice(index, 1);
  }

  count () {
    return this.ideas.length;
  }

  formatToString () {
    let string = `<${this.title}> has <${this.count}> idea(s)\n`
    this.ideas.forEach((idea) => {
      string += `<${idea.title}> (<${idea.status}>) - <${idea.description}>\n`
    })
    return string;
  }
}

const emptyBoard = new ProjectIdeaBoard("Empty Board")
console.log(emptyBoard.formatToString());

new ProjectIdea("Smart Home System", "An integrated system to control lighting, temperature, and security devices remotely.");

const techProjects = new ProjectIdeaBoard("Tech Projects Board")
console.log(techProjects.formatToString());

Your browser information:

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

Challenge Information:

Build a Project Idea Board - Build a Project Idea Board

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-project-idea-board/67051431a73f1ca25d9a6f25.md at main · freeCodeCamp/freeCodeCamp · GitHub

Hi @snaylspace

I don’t think you need the angular brackets. For the count are you calling a method?

Happy coding