Skip to main content
Module

x/structurae/sorted-array.ts>SortedArray#isSorted

Data structures for high-performance JavaScript applications.
Latest
method SortedArray.prototype.isSorted
import { SortedArray } from "https://deno.land/x/structurae@4.0.1/sorted-array.ts";

Checks if the array is sorted.

Examples

//=> SortedArray [ 2, 3, 4, 5, 9 ]; SortedArray.isSorted(); //=> true SortedArray.reverse(); SortedArray.isSorted(); //=> false;

Returns

boolean

whether the array is sorted