javascript access pushed element

JavaScript
let newLength = myList.push(myElm);

myList[newLength - 1] // This then equals myElm
Source

Also in JavaScript: