Returns the type of a specified object instance.
var typeVar = Object.getType(instance);
Term
Definition
instance
The object to return the type for.
A type instance that represents the run-time object of instance.
Exception type
Condition
Error.argumentUndefined Function
(Debug) instance is undefined.
Error.argumentNull Function
(Debug) instance is null.
Use the getType function to get a new type instance that represents the run-time type of an object.
The following example shows how to use the getType function to create a new type instance that represents the run-time type of an object. It then displays information based on the object type.