Retorne o último item de um array, ou o caractere final de uma string. Para uma entrada vazia, retorne undefined.
lastItem([0, 4, 19, 34, 50, -9, 2]) ➞ 2
lastItem("The quick brown fox jumped over the lazy dog") ➞ "g"
lastItem([]) ➞ undefinedundefined se o array ou a string estiverem vazios.