Share via


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

Error.argumentUndefined Function

(Debug) instance is undefined.

Error.argumentNull Function

(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.

See Also

Reference

Object Type Extensions

Other Resources

Language Reference