I love mike bostock's stuff, but his code often makes me feel sorry for whoever has to deal with his code after him
// Pick a location that’s not yet in the maze (if any).
do if ((index0 = remaining.pop()) == null) return true;
while (cells[index0] >= 0);
// Perform a random walk starting at this location,
previous[index0] = index0;
walk: while (true) {
i = index0 % width;
j = index0 / width | 0;
// picking a legal random direction at each step.
direction = Math.random() * 4 | 0;
if (direction === 0) { if (j <= 0) continue walk; --j; }
else if (direction === 1) { if (j >= height - 1) continue walk; ++j; }
else if (direction === 2) { if (i <= 0) continue walk; --i; }
else { if (i >= width - 1) continue walk; ++i; }
note the braceless do while and the labeled jump statements