Creat a new object consturctor


Hi, I have to create a new object constructor, I tried many time unsuccessful. I need some help, thanks.

var MyConstructor = function(){};

var me = new MyConstructor(); = "Alex";
me.age = 27;


When you use the constructor, the syntax looks like this:

var myObj = new Object();

where myObj is the name of your object



var me = new Object(); = “Alex”;
me.age = 27;


this bit:

was part of the information section of the exercise, i just copied pasted it

you’re welcome :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.