• Returns a random element from an array

    Example

    sample([3, 7, 9, 11]); // 9
    

    Type Parameters

    • T

    Parameters

    • arr: T[]

    Returns T

Generated using TypeDoc