Inspired by my classmate Alex Persian's Bubble Sort Exploration after our first inaugural "Algorithm Friday" (see below), I spent a couple of hours this morning putting together a little bubble sort demo of my own:
...which has inspired me to start making a habit of validating and testing every function I ever write from now on. On a related note, this is easily breakable ;). Have fun!
( Math.floor( Math.random() * (high - low + 1) ) + low );
Not a bad little exercise for an early Saturday morning!
FYI: Algorithm Fridays get pretty nuts: