about | help | code help+videos | done | prefs |
foundFirst
Given a list and two values, find the first occurrence of each value. Return the lower index of the two locations. If one of the values is not in the list, use the other value. When neither value is in the list return -1. foundFirst([], 1, 2) → -1 foundFirst([1, 3, 4, 2], 1, 2) → 0 foundFirst([2, 3, 4, 1], 1, 3) → 1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy