Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check whether array ascending

function isAscending(arr) {
    return arr.every(function (x, i) {
        return i === 0 || x >= arr[i - 1];
    });
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #array #ascending
ADD COMMENT
Topic
Name
7+9 =