Function arrayReject

  • Removes elements that do not pass the predicate. If limit is provided, at most that many elements will be deleted. i.e. new length will be >= array.length - limit.

    Type Parameters

    • T

    Parameters

    • array: nil | T[]
    • predicate: (v: T, i: number) => boolean
    • Optionallimit: number

    Returns T[]