Swap Two Elements in an Array
You have an array of fruit. Swap the first and last elements of the array so that the array begins with 'pear' and ends with 'apple'.
Premium
function greet(name) {
return `Hello, ${name}!`;
}
console.log(greet("Erik"));
JavaScript
Console