Problem

Return first index of target, or -1.

Examples

  • listIndexOf([4, 5, 4], 4) -> 0
  • listIndexOf([1, 2], 3) -> -1
Compile and test (Ctrl+Enter)