samedi 16 mai 2015

Differentiate between two different actions in loop

I am trying to do something like this

var teller = 1;
if (teller % 2 === 0) {
  "do this"
} else {
  "do something else"
}
teller++;

The problem is that he always comes into the else loop. Someone knows why?

Aucun commentaire:

Enregistrer un commentaire