how to access the very last element of an array indexof javascript code example Example: last index of array js array.lastIndexOf(searchElement[, fromIndex]);