Let's say that the word is basketball.
If we want the first six letters
of this word, then this is
what we need to do:
Here we are telling Ruby to
start from position 0 and
get 6 letters.
Now let's try to get ball from the string.
The alpahbet b is at the seventh position from the start.
However, since the first position is counted as zero
the position of b is 6th.
So, we will ask Ruby to start from position 6
and from there, get 4 values.
Let's see one more example: