Creating new object


#1


https://www.codecademy.com/courses/javascript-beginner-en-9Sgpi/2/3?curriculum_id=506324b3a7dffd00020bf661#


I tried lots of thing but i cant go pass this lesson plese help.
This is my current code.


var me = {
    myObj.name = "Muhsin";
    myObj.age = 12;
}


#3

Hi you can create a object in two way

like that

var myObject = {
   name: 'wiz',
   age: 0
}

or that

var myObject = new Object();
myObject.name = 'wiz';
myObject.age = 0;

#4

ok thanksfor you help here is the code.

var myObject = new Object();
myObject.name = 'Muhsin';
myObject.age = 12;

#5

Did you pass you the lesson?


#6

yes i passed the lesson


#7

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