Description

Count the number of elements in an array or list

Syntax

count(array)

Parameters

Input ParameterTypeDescription
arrayarray or listAn array or list containing elements to be counted

Return value

Type
number

Sample

ExampleResultDescription
count([5, 10, 15, 20])4Returns the number of elements in the input array

To view all the Math and Number functions, click here.

See Also

For