js array get 2nd last element code example
Example: get last element of array javascript
let colors = ["red", "yellow", "green"];
let lastELement = colors[colors.length - 1]
let colors = ["red", "yellow", "green"];
let lastELement = colors[colors.length - 1]