Library API
    Preparing search index...

    Function clear

    • Clears an array in-place, removing all elements and filling with null before truncation.

      Type Parameters

      • T

      Parameters

      • arr: T[]

        The array to clear

      Returns T[]

      The cleared array

      const arr = [1, 2, 3];
      clear(arr); // arr is now []