Gets the slot at the given index.
a number in range 0..$
the slot at the given index
RangeError if an invalid index is given
if(!inventory[1].empty && inventory[1].item == Items.APPLE) { ... }
See Implementation
Gets the slot at the given index.