about | help | code help+videos | done | prefs |
indexOf
Complete the function so that it returns the index of the first occurrence of x in the list. If x is NOT in the list, then the function should return a -1. indexOf([6, 12, 7, 2, 7], 7) → 2 indexOf([7, 2, 8], 5) → -1 indexOf([4, 4, 4, 4], 4) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200
Copyright Nick Parlante 2017 - privacy