how to search for the end of an array MDN code example Example: last index of array js array.lastIndexOf(searchElement[, fromIndex]);