Solution to the puzzle; took about 3 to code minutes after I found the thumbnails for the slideshow.
c = c < 4 ? c + 1 : 0;
It's shorter (which matters for client-side code), and makes it more explicit what you're attempting to accomplish.
Alternatively, increment with c++ and replace [c] with [c%4].
c = c < 4 ? c + 1 : 0;
What is this line of code saying exactly.. ? if (c < 4) {
c = c + 1;
} else {
c = 0;
} var x = a || b || (function(){ /* stuff here */ })()
or var a = b = b || {}