Function isEmpty

Test whether an array is empty.

isEmpty([]);
// => true
  • Type Parameters

    • Item

      Type of the array elements.

    Parameters

    • array: Item[]

      The array to test.

    Returns boolean

    True if the array contains no element, false otherwise.