Challenge for Ruby Arrays And Hashes
You will be given an array of numbers
ar. Create and print another array of length 2 that just contains the first and last number in the original array.
(Note: To print an array
ar, just use
print ar. To print a newline, use "\n".)
Alternatively, you can try out Learneroo before signing up.