Get last n elements of an array

Write a function that takes an array (a) as argument. Extract the last 3 elements of 'a'. Return the resulting array
JavaScript
Console