Student.js
/**
     * Calculates and returns the number of workshops to which the student has been assigned.
     */
Calculates and returns the number of workshops to which the student has been assigned.
Calculates and returns the number of workshops to which the student has been assigned .
numberAssigned() {
        let total = 0;
        for (const workshop of this.assignedWorkshops) {
            if (workshop != null) {
                total += 1;
            }
        }
        return total;
    }
numberAssigned ( ) { let total = 0 ; for ( const workshop of this . assignedWorkshops ) { if ( workshop != null ) { total += 1 ; } } return total ; }
Calculates and returns the number of workshops to which the student has been assigned.
Calculates and returns the number of workshops to which the student has been assigned .