Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is an instantiable "class" called in JavaScript other than an object?

I have an object like this:

function Person() {}

What would you call it other than an object? Obviously it is not a class, but what is it? I am looking for a term that is not an object, because I want to specifically highlight the fact that you can create a new instance of it.

like image 662
Tower Avatar asked Jan 08 '11 11:01

Tower


1 Answers

"function Person() {}" is a constructor function for a type. A value of new Person() would be an instance (or object) of type Person.

like image 141
Mark Cidade Avatar answered Oct 13 '22 00:10

Mark Cidade