Printing an ArrayList in JS

I need to debug an issue I’m having and part of that process has to involve me looking at an ArrayList I have set up.

I know things are being added to it, but I need to check if they’re being taken off. I’ve searched through the forums to see if anyone had any answers, but couldn’t find any. If I write this:

print("List now contains: " + lordlingArrList);

I get this in the console:

List now contains: System.Collections.ArrayList

With a normal array, it would have printed out the contents of the list. And in fact, on sites that refer to ArrayList, they say that this should work. Is this just an issue with Javascript? Unity? Me?

Thanks in advance!

It’s not really an issue, it’s just that it will never print the contents (using any kind of array except the JS Array class) unless you iterate through the array and print each entry. By the way you shouldn’t use ArrayList; use a generic List instead. “var foo = new List.();”

–Eric