Problem

Return last index of target or -1.

Examples

  • lastIndexOf([1, 2, 1], 1) -> 2
Compile and test (Ctrl+Enter)