Return last n array elements
Write a function that takes an array (a) and a number (n) as arguments. It should return the last n elements of a.
Premium
function greet(name) {
return `Hello, ${name}!`;
}
console.log(greet("Erik"));
JavaScript
Console