Help with School Catalogue Proyec

Hi I am getting undefined while running the school catalogue proyect, but I can’t find the error.

class School {

  constructor (name,level,numberOfStudents){

    this._name = name;

    this._level = level;

    this._numberOfStudents = numberOfStudents;

  }

    get name (){

      return this._name;

    }

    get level (){

      return this._level;

    }

    get numberOfStudents (){

      return this._numberOfStudents;

    }

    set numberOfStudents (value){

      if (typeof value === 'number' & num >= 0){

        this._numberOfStudents = value;

      } else {

        return 'Invalid input: numberOfStudents must be set to a Number.'

      }

    }

    quickFacts () {

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

      }

  static pickSubstituteTeacher (substituteTeachers) {

    const randNum = Math.floor(Math.random()*substituteTeachers.length);

    return substituteTeachers[randNum];

  }

}

class PrimarySchool extends School {

  constructor(name,numberOfStudents,pickupPolicy) {

  super (name,'primary',numberOfStudents);

  this._pickupPolicy = pickupPolicy

  }

  get pickupPolicy (){

    return this._pickupPolicy;

  }

} 

class HighSchool extends School {

  constructor(name, numberOfStudents, sportsTeams){

    super(name,'high',numberOfStudents);

    this.__sportsTeams = sportsTeams;

  }

  get sportsTeams (){

    return this._sportsTeams;

  }

}

const lorraineHansbury = new PrimarySchool ('Lorraine Hansbury',514 ,'Students must be picked up by a parent, guardian, or a family member over the age of 13.')

lorraineHansbury.quickFacts();

const sub = School.pickSubstituteTeacher(['Jamal Crawford', 'Lou Williams', 'J. R. Smith', 'James Harden', 'Jason Terry', 'Manu Ginobli']);

const alSmith = new HighSchool('Al E. Smith',415, ['Baseball', 'Basketball', 'Volleyball', 'Track and Field']);

console.log(alSmith.sportsTeams);

you have two underscores in constructor of HighSchool:

  constructor(name, numberOfStudents, sportsTeams){

    super(name,'high',numberOfStudents);

    this.__sportsTeams = sportsTeams;

  }

and then in the getter you use a single underscore:

  get sportsTeams (){

    return this._sportsTeams;

  }

Just fixed it, thanks!!