Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get last item in array js

if (loc_array[loc_array.length - 1] === 'index.html') {
   // do something
} else {
   // something else
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #item #array #js
ADD COMMENT
Topic
Name
1+5 =