@stdlib/array
Version:
Arrays.
29 lines (20 loc) • 490 B
Plain Text
{{alias}}( x, value )
Counts the number of elements in an array that are equal to a specified
value.
The function treats `NaN` values as the same value.
Parameters
----------
x: ArrayLikeObject
Input array.
value: any
Input value.
Returns
-------
out: integer
Number of elements that are equal to a specified value.
Examples
--------
> var out = {{alias}}( [ 0, 1, 1 ], 1 )
2
See Also
--------