Skip to main content

List Length

Runs on: Shared (backend or chatbox overlay).

Outputs how many items a list holds, for any list type. Use it to check for an empty list, show an entry count in chat or set the upper bound of a random index.

Inputs​

NameTypeDescription
listlistThe list to measure.

Outputs​

NameTypeDescription
lengthnumberThe number of items. An empty list outputs 0.

Example​

After each entry is added with List Add Item, pipe the result into List Length and a Text Format node to send "There are 42 entries so far!" to chat.