Object.getType Function
Returns the type of a specified object instance.
var typeVar = Object.getType(instance);
Arguments
Term |
Definition |
---|---|
instance |
The object to return the type for. |
Returns
A type instance that represents the run-time object of instance.
Exceptions
Exception type |
Condition |
---|---|
(Debug) instance is undefined. |
|
(Debug) instance is null. |
Remarks
Use the getType function to get a new type instance that represents the run-time type of an object.
Example
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.