about | help | code help+videos | done | prefs |
arrayFirstDuplicate
Return the first word in the words array that is the same as another word in the array. If there are no duplicate elements, then return the last word in the array. The words array will contain at least one word. arrayFirstDuplicate(["jet", "golf", "hi", "golf", "kid"]) → "golf" arrayFirstDuplicate(["jet", "golf", "hi", "golf", "jet", "lol"]) → "jet" arrayFirstDuplicate(["jet", "golf", "hi", "lol"]) → "lol" ...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: 10 Post-solution available
Copyright Nick Parlante 2017 - privacy