• JMap.Util.Array.clear

    Removes all items of the specified array, making it empty.

    Type Parameters

    • T

    Parameters

    • array: T[]

      the array

    Returns T[]

    the given array (and not a copy)

    Example

    const myNumbers = [3, 5, 6, 7]
    // remove all items
    JMap.Util.Array.clear(myNumbers)
    console.log(`Count=${myNumbers.length}`)
    // display message "Count=0"