Check Data Types with Lang

The YUI Global Object includes several useful type-checking methods in the Lang object. In addition to the 'isXYZ' type check methods, YUI3 includes Y.Lang.type, which returns a string representing the type of the tested object. Click the "Check" button in each row to evaluate the data.

Data isObject isArray isFunction type
null
[] or new Array()
{} or new Object()
function Foo() {}
new Foo()