js get index from right to left on map code example Example: last index of array js array.lastIndexOf(searchElement[, fromIndex]);