Math.count
The number of items in a list of numbers, checking it is a list. Cloud9Trader adds it to JavaScript’s built-in Math.
count(x: number[]): number;Parameters
Section titled “Parameters”- x: an array of numbers, such as the result of
prices().
Same as x.length, but stops the run if x is not an array.
Errors
Section titled “Errors”Stops the run if x is not an array: “Value passed to Math.count() must be an array of numbers”.
Example
Section titled “Example”function onIntervalClose() { log("count", Math.count(prices(10)));}