Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

Const isSorted

  • isSorted(arr: unknown[]): boolean
  • Checks if the given array is sorted.

    example

    isSorted([1, 2, 3]); // true isSorted([2, 1, 5, 3]); // false

    Parameters

    • arr: unknown[]

      The array to check.

    Returns boolean

    Whether the array is sorted.

Legend

  • Function

Generated using TypeDoc