get last objec tin array code example Example: javascript get the last array element const myArray = [1, 2, 3] console.log(myArray.item(-1)) //=> 3