please help me. thank you.


Javascript objects are commonly defined like this:

var myOwnObject = {
    name: "kelly",
    age: 26,
    dream: "designer"


@levibarker thank you for your help. I tried your format ,it was good, but ":"should take place of "=".

you talk about literal syntax;

could you please help me how to write my code by object constructor?



Ahh oops I had some errors in my code thanks for catching that.

It looks like new object() should be changed to new Object() with the "O" capitalized.


by object constructor it'll be:

var myOwnObject = new Object();
myOwnObject.name = "Alex";
myOwnObject.age = 19;
myOwnObject.sex = "male";


or you can also use: "myOwnObject['name'] = 'Alex';"