Sign up (with export icon)

utils/count

Api-module icon module

Functions

  • Chevron-right icon

    count( iterable ) → number

    Returns the number of items return by the iterator.

    count( [ 1, 2, 3, 4, 5 ] ); // 5;
    
    Copy code

    Parameters

    iterable : Iterable<unknown>

    Any iterable.

    Returns

    number

    Number of items returned by that iterable.