javascript get last element of aray 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]