samedi 31 août 2019

error for - if : The results are not as expected

I don't get the values that I should get - You can see here: https://stackblitz.com/edit/angular-nhvnwz

countStateStudents(){
  for (let student of this.students){
if (student.state == 1){
  this.signedup++;
} else
if (student.state == 2){
  this.boughtPIN++;
} else
if (student.state == 3){
  this.enrolled++;
} else
if (student.state == 4){
  this.notinterested++;
}
 }

Aucun commentaire:

Enregistrer un commentaire