console.log last item in array code example
Example 1: javascript get last element in array
//why was this a ad
Example 2: get the last element of array javascript
if (loc_array[loc_array.length - 1] === 'index.html') {
// do something
} else {
// something else
}