Create a function that takes an array of strings and return the first and last elements as a new array.
firstLast(["one", "two"]) ➞ ["one", "two"]
firstLast(["edabit", "13", "true"]) ➞ ["edabit", "true"]
firstLast(["zero"]) ➞ ["zero"]return the result.