Check if something is a list
- by 8EM
What is the easiest way to check if something is a list?
A method doSomething has the parameters a and b. In the method, it will loop through the list a and do something. I'd like a way to make sure a is a list, before looping through - thus avoiding an error or the unfortunate circumstance of passing in a string then getting back each letter.
This question must have been asked before - however my googles failed me. Cheers.