code: function next() {
  			var next;
  
  			if (end < 0) { // Buffer is empty
  				return null;
  			}
  
  			next = buffer[begin];
  			delete buffer[begin];
  			
  			if (begin === end) { // Last element
  				initBuffer();	
  			} else {
  				begin = (begin + 1) % BUF_SIZE;
  			}
  			return next;
  		}
docs: Get next item from buffer