about | help | code help+videos | done | prefs |
Given a non-empty array containing an even number of elements, return a new array consisting of the elements from the second half of the given array. For example, if the given array contains 6 elements, return a new array consisting of its last 3 elements. lastHalf([4, 7, 1, 5, 4, 2]) → [5, 4, 2] lastHalf([2, 8]) → [8] lastHalf([1, 2, 2, 1]) → [2, 1] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200
Copyright Nick Parlante 2017 - privacy