Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Specifies the function that creates an object.
object.constructor
Remarks
The required object is the name of an object or function.
The constructor property is a member of the prototype of every object that has a prototype. This includes all intrinsic JScript objects except the Global and Math objects. The constructor property contains a reference to the function that constructs instances of that particular object. For example:
x = new String("Hi");
if (x.constructor == String)
// Do something (the condition will be true).
or
function MyFunc {
// Body of function.
}
y = new MyFunc;
if (y.constructor == MyFunc)
// Do something (the condition will be true).
Requirements
Applies To: Array Object (JScript 5.6)| Boolean Object (JScript 5.6)| Date Object (JScript 5.6)| Function Object (JScript 5.6)| Math Object (JScript 5.6)| Number Object (JScript 5.6)| Object Object (JScript 5.6)| String Object (JScript 5.6)