• Clears the contents of an Array

    Mutation

    Example

    Remove all elements

    const array = [1, 2, 3];
    clear(array);
    console.log(array); // []

    Parameters

    • array: unknown[]

      the Array to clear

    Returns void

Generated using TypeDoc