js split array by - code example
Example 1: split array javascript
// Returns new array from exising one
arr.slice(start, end);
Example 2: javascript split array
var linkElement = document.getElementById("BackButton");
var loc_array = document.location.href.split('/');
var newT = document.createTextNode(unescape(capWords(loc_array[loc_array.length-2])));
linkElement.appendChild(newT);