javascript array split example
Example 1: javascript split
// bad example https://stackoverflow.com/questions/6484670/how-do-i-split-a-string-into-an-array-of-characters/38901550#38901550
var arr = foo.split('');
console.log(arr); // ["s", "o", "m", "e", "s", "t", "r", "i", "n", "g"]
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);