You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*Given an array of numbers, return a new array of length number containing the last even numbers from the original array (in the same order). The original array will be not empty and will contain at least "number" even numbers.
//P: two inputs, one an array of integers and the second a lone integer (x). the array may contain even and odd integers, negative and positive. there will be at least x even integers in the array
//R: return the last x even integers in the original array, in the original input order
//E: [1,2,3,4,5,6,7,8,9], 3 => [4,6,8]
//P: filter the input array to leave only the even number elements
// return the filter array sliced to the last x number of elements