about | help | code help+videos | done | prefs |
indexOf
Given an array of integers, and a value, return the index of the first occurrence of that value in the array. If the value does not appear in the array, return -1. indexOf([3, 7, 2], 2) → 2 indexOf([3, 7, 2], 10) → -1 indexOf([8, 8, 5, 1, 4], 8) → 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