Finding out if the object is an ARRAY type?
Hello Everyone,
How can I find out if it is an Array object that is being passed? I usually rely upon the "typeof()" which returns the primitive type. But I am unable to find out if the passed value is an Array. I wrote a simple function which return the type:
function getType(p:object)
{
return typeof(p);
}
So I then wrote a function with switch statement:
function getArray(p:Object)
{
switch(typeof(p))
{
case 'string':
return "STRING";
break;
case 'boolean':
return "BOOLEAN";
break;
case 'object':
return "OBJECT";
break;
}
}
I would highly apprecite your input in this.
Thanks you.
