display only on last item of the array code example
Example: get last item in array javascript
var colors = ["black", "white", "red", "yellow"];
var yellow = colors[colors.length - 1];
var colors = ["black", "white", "red", "yellow"];
var yellow = colors[colors.length - 1];