Javascript TypeOf with Array Support 2007.185
function typeOf(obj) {
if ( typeof(obj) == 'object' )
if (obj.length)
return 'array';
else
return 'object';
} else
return typeof(obj);
}
Just in case someone else was needing the ability to discern the difference between objects, arrays, and other data types in Javascript.