12. Practice makes perfect


#1


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


it says there is a syntax error but i cant see any mistakes.please help.


var object1 = {
name : "Muhsin Alam"
age : 12
gender : "Male"
};

var object2 = {};
object2.name = "Shafiul Alam";
object2.age = 9;
object2.gender = "Male";
console.log(object2.name);
console.log(object2.age);
console.log(object2.gender);

var object3 = new Object();
object3['name'] = "Calachala Puga";
object3['age'] = 1967676;
object3['gender'] = "Shemale";
console.log(object3['name']);
console.log(object3['age']);
console.log(object3['gender']);


#2

var object1 = {
name : "Muhsin Alam"  // use ,
age : 12   
gender : "Male"
};

#3

still says there is a syntax error.


#4

hello can anyone help me


#5

var object1 = {
name : "Muhsin Alam",  // see what i said
age : 12,       //
gender : "Male"   //
};

#6

var object1 = {
name : "Muhsin Alam"
age : 12
gender : "Male"
};

var object2 = {};
object2.name = "Shafiul Alam";
object2.age = 9;
object2.gender = "Male";
console.log(object2.name);
console.log(object2.age);
console.log(object2.gender);

var object3 = new Object();
object3['name'] = "Calachala Puga";
object3['age'] = 1967676;
object3['gender'] = "Male Alien";
console.log(object3['name']);
console.log(object3['age']);
console.log(object3['gender']);

#7

see above what i changed


#8

ok thanks it was my mistake

var object1 = {
name : "Muhsin Alam",
age : 12,
gender : "Male"
};

var object2 = {};
object2.name = "Shafiul Alam";
object2.age = 9;
object2.gender = "Male";
console.log(object2.name);
console.log(object2.age);
console.log(object2.gender);

var object3 = new Object();
object3['name'] = "Calachala Puga";
object3['age'] = 1967676;
object3['gender'] = "Male Alien";
console.log(object3['name']);
console.log(object3['age']);
console.log(object3['gender']);

#9

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