for (var n = 0; n < 1e14; n++) { // arbitrary limit that's not too big document.writeln(n.toString(8)); // not sure what's the best way to output it in JavaScript }