#Object that is a function?

4 messages · Page 1 of 1 (latest)

coarse estuary
#

Sounds almost intentionally confusing...

But effectively:

Object - is an object
Object() - is a function, specifically a constructor function which will return an Object instance.

terse magnet
#

That's why function naming is pretty important for yourself and other devs who'll be looking at your code

terse magnet
#

Wait, I’m confused by your question. An object is a data type and the Object() is a constructor to create an object.