JavaScript/Reserved words/typeof
The typeof keyword
editThe typeof keyword is a unary operator that returns a string giving the type of the parametre.
Syntax
edit typeof[(]expression[)];
The operator returns six values, which are boolean, function, number, object, string, and undefined.
Examples
edit theArray = new Array();
if (typeof(theArray) == 'object') {
[…]
}