| about | help | code help+videos | done | prefs |
Given an array, return the first index of an element that is out of ascending order if there is one and -1 if all the elements in the array are in ascending order. nonAscIndex([1, 2, 3]) → -1 nonAscIndex([1, 1, 1]) → -1 nonAscIndex([1, 2, 1, 3, 4]) → 2 ...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: 100
Copyright Nick Parlante 2017 - privacy