x = (x === lightImages.length - 1) ? 0 : x + 1;
I understand the rest of my code so I won't add it because that would be pointless. Basically I'm just unsure what the '? 0' does in this code, my friend coded it for me because I was struggling with the rest of the code and I'd like to know exactly what is does so I could use it again properly.