School Catalogue Project (classes and inheritance)

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(newNumerOfStudents) {
     if(typeof newNumberOfStudents === number){
      this._numberOfStudents = newNumberOfStudents;
    } else {
      console.log(`Invalid input: ${this._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 randInt = Math.floor(Math.random() * substituteTeachers.length);
       return `Your subsitute teacher is ${substituteTeachers[randInt]}.`;
     }
 }

 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','abc', 'Students must be picked up by a parent, guardian, or a family member over the age of 13.');
lorraineHansbury.quickFacts();

i don’t understand set method in school, i can still able write string in numberOfStudents argument,script tag

here:

// this is in the constructor method
this._numberOfStudents = numberOfStudents;

you don’t use the setter. So then no validation is done

Why are you not using the setter?