function(code){ let lastItemArray = '' console.log(code) for(let i = 0; i < code.length; i++){ if(i == code.length - 1) { lastItemArray = code[i] } } return lastItemArray } console.log([1,2,3,4,5])