DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
get last element in array in js
if (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
COMMENT
Name
2+2 =
Submit