What is a constructor in programming?

735 viewsOtherTechnology

I am still trying to wrap my head around the concept I learned in class a while ago. We learned briefly about constructors in JavaScript. Can someone please ELI5? Thank you!

In: Technology

18 Answers

Anonymous 0 Comments

A constructor is a method that initializes an object instance. <- that is all. It’s usually tied directly to the object and is usually called automatically by the language when you instantiate a new copy of the object.

You are viewing 1 out of 18 answers, click here to view all answers.