Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get last element in array in js

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