Here is my JavaScript code so far:
var linkElement = document.getElementById(\"BackButton\"); var loc_array = document.location.href.split(\'/\'); var newT =
I generally use underscorejs, with it you can just do
if (_.last(loc_array) === 'index.html'){ etc... }
For me that is more semantic than loc_array.slice(-1)[0]
loc_array.slice(-1)[0]