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".)

Please sign in or sign up to submit answers.

Alternatively, you can try out Learneroo before signing up.

Contact Us
Sign in or email us at [email protected]