constructor  Array  instance property JS Home  <<  JS Reference  <<  Array  <<  constructor

Description

Returns a reference to the function that created the prototype.

Syntax

Signature Description
anArray.constructorReturns a reference to the function that created the prototype.

Parameters

None.

Examples

The code below displays prototype function of Array.


var anEmptyArray = [];
alert('Array constructor is ' + anEmptyArray.constructor);

Press the button below to action the above code:

Related Tutorials

JavaScript Intermediate Tutorials - Lesson 1 - Arrays

JavaScript Basics

JavaScript Basics

JavaScript Intermediate

JavaScript Intermediate

JavaScript Advanced

JavaScript Advanced

JavaScript Reference

JavaScript Entities

Globals

Array

Class Properties
prototype
Instance Properties
constructor
length
Class Methods
None.
Instance Methods Getters
concat()
join()
slice()
toString()
Instance Methods Setters
pop()
push()
reverse()
shift()
sort()
splice()
unshift()

Statements

Operators