size

This function returns the size of the supplied array, or the empty sequence if the empty sequence is provided.

size($a as array?) as integer?

Example 186. Retrieving the size of an array

let $a := [1 to 10]
return size($a)
        

Result (run with Zorba): 10