//Given an array of ints, return true if 6 appears as either the first or last element in the array. The array will be length 1 or more. //Given an array of ints, return true if the array is length 1 ...
Given an array of ints, swap the first and last elements in the array. Return the modified array. The array length will be at least 1. swapEnds([1, 2, 3, 4]) → [4 ...