Learn Ruby
String
3.19
Lesson

Last position is -1

If zero is the first position then what’s the last position. Answer is -1.

We can use -1 to find the last letter of the string hello.

What about second last. We can use -2.