if array on the last start from 1 in js code example Example: last element from list javascript const lastItem = colors[colors.length - 1]