J
Jeff Miller
Hello,
Let's say I have an array like this:
@name_array = ["john", "t.", "smith"]
how can I get the first and LAST entries? IE:, I don't want the middle
one or any in between. I know I can get the first entry by
@name_array[0], but this will be part of a function in which some arrays
will have 2 entries, others 3 or even more, and I just want the last
entry. How can I do this?
Thanks!!
- Jeff Miller
Let's say I have an array like this:
@name_array = ["john", "t.", "smith"]
how can I get the first and LAST entries? IE:, I don't want the middle
one or any in between. I know I can get the first entry by
@name_array[0], but this will be part of a function in which some arrays
will have 2 entries, others 3 or even more, and I just want the last
entry. How can I do this?
Thanks!!
- Jeff Miller