lastIndexOf() returns the last index (position) of a specified value.
Start the search at position -2: