How to check if an array is empty?

Not sure how to check if an array is empty. Maybe check if array[0]=null? I don’t know how to do that.

If you mean empty as in no children.

Use Number of children

1 Like

exactly what i needed. maybe i need to look before making a whole damn topic.

2 Likes

Well to be fair, “number of children” is the last thing you would think of as a programmer. I would have called it “length of array” or “size of array” or “element count”…

1 Like