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