Nope, setInterval didn't work either. I can't see why when I change the swap line above to:
setTimeout(swap, 25, j, j+1);
It doesn't wait 25 ms before each swap instead of leaving me with the same unsorted page (as noted, it works as posted above). I may just turn it in for partial credit, 5 hours with no progress is enough.
@adamrcaldwell Yes, most of what i'm seeing online has setInterval clear with entirely separate button. But I'm trying to figure out how this works: