javascript find the end of the array code example
Example: find last item in an array JS
if (loc_array[loc_array.length - 1] === 'index.html') {
// do something
} else {
// something else
}
if (loc_array[loc_array.length - 1] === 'index.html') {
// do something
} else {
// something else
}