Submission Status: Passed
Submitted for: Remove the First and Last Element from a Ruby Array
Submitted at: April 06, 2018
def remove_first_and_last(arr) raise StandardError, 'At least three elements are needed in the array' if arr.count <= 2 arr[1..-2] end
devCamp does not support ancient browsers.
Install a modern version for best experience.