While your is also correct, to understand why, it might be easier to see the answer as [:and, :jelly]. With the answer in this form, the values in the range 2 through -1 are :and, at array[2], and :jelly, at array[-1], which is the first index position from the end.