Arrays and Objects in JS "Practice makes perfect"


#1

Hi
i could not pass the lesson ,who can help me?thanks

var object1={
name:"vincent",
age:23,
gender:"woman"
};

var object2=new Object();
object2.name="vincent";
object2.age=23;
object2.gender=woman;

var object3=new Object();
object3["name"]="vincent";
object3["age"]=23;
object3["gender"]=woman;


#2

gender for both object2 and object3, woman is a undefined variable. Are you sure the genders shouldn't simple be strings?


#3

yes ,thanks ,i corrected it ,thanks .


#4

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