School catelogue

Lorraine Hansbury educates undefined students at the primary school level.
[ ‘Baseball’, ‘Basketball’, ‘Volleyball’, ‘Track and Field’ ]

here:

  quickFacts() {
    console.log(`${this.name} educates ${this.numberOfStudents} students at the ${this.level} school level.`)
  }

numberOfStudents property does not exists on this object. You made a typo in the getter name

1 Like

how do you find it so fast?

I logged the object to see the properties:

  quickFacts() {
    console.log(this);
    console.log(`${this.name} educates ${this.numberOfStudents} students at the ${this.level} school level.`)
  }

which all looked good, so then I was like: what about the getter? Looked at the getter, spotted the problem

I have a couple of unfair advantages:
years of programming experiences, helping a lot of people on this forum (catching an insane amount of typos during that time haha), so also done and helped on this project multiple times.

2 Likes

OMG, I got it. 10x so much…,

1 Like

the underscore (_)? There is nothing special about the underscore, just a naming convention to prevent clashing with the getter.

1 Like