Improve Ruby and Go circular buffer.
Complete the challenges using Javascript.