1var foods = ["kiwi","apple","banana"];
2var banana = foods[foods.length - 1]; // Getting last element
1var my_array = /* some array here */;
2var last_element = my_array[my_array.length - 1];
1var linkElement = document.getElementById("BackButton");
2var loc_array = document.location.href.split('/');
3var newT = document.createTextNode(unescape(capWords(loc_array[loc_array.length-2])));
4linkElement.appendChild(newT);
5