Help on Arrays and Objects "Practice makes perfect"


#1


Hi, I really need some help for this exercise! Any help will be appreciated! :smiley:


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


Error i encountered: Did you make object3 an object?
ReferenceError: object is not defined
This is the code that i wrote:

var object1 = new Object();
    object1.name = "f";
    object1.age = 32;
var object2 = new Object();
    object2.name = "hi",
    object.age = 18
var object3 = new Object();
    object3.name = "TKY";
    object3.age = 13;


#2

when you create the age property for object2 you use object instead of object2, and object is not defined


#3

also you have syntax errors:

var object2 = new Object();
    object2.name = "hi"; // used , 
    object2.age = 18; // missed ;

#4

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