I currently have the conditional below which works fine, however when I use as a ternary conditional it increments but ouputs 0 twice.
Currently working js:
if (z === shapes.length-1) {
z= 0;
}
else {
z++;
}
Not Working:
let cards = (z === shapes.length-1) ? 0 : (z++);
Aucun commentaire:
Enregistrer un commentaire