We want the know the first letter of the string hello.
In Ruby the first position is 0 and not 1. So we start counting from 0. First letter is at position 0. Second letter is at position 1.
Computer science folks call it
index rather than calling it
So we can say that first letter is at index
0. Second letter is at index
1 and so on.
Similarly if we want the 3rd letter then we need to use value
Let’s see one more example.