count
Modified on Tue, 22 Aug 2023
Description
Count the number of elements in an array or list
Syntax
count(array)
Parameters
Input Parameter | Type | Description |
---|---|---|
array | array or list | An array or list containing elements to be counted |
Return value
Type |
---|
number |
Sample
Example | Result | Description |
---|---|---|
count([5, 10, 15, 20]) | 4 | Returns the number of elements in the input array |
To view all the Math and Number functions, click here.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article