What follows for ()can be any statement; it can be something with curly braces, or it can be one expression, or it can be an empty expression. for (...);equivalently for (...) {}. Naturally, this should only be used in conjunction with a closed loop that will naturally end, or you will have an infinite loop on your hands.
- ; - , for ( , ).
for (
var j, x, i = o.length;
i;
j = parseInt(Math.random() * i),
x = o[--i],
o[i] = o[j],
o[j] = x
)
;
:
for (
var j, x, i = o.length;
i;
) {
j = parseInt(Math.random() * i);
x = o[--i];
o[i] = o[j];
o[j] = x;
}
while :
var j, x, i = o.length;
while (i) {
j = parseInt(Math.random() * i);
x = o[--i];
o[i] = o[j];
o[j] = x;
}