What are objects for? (Needs Debugging)


var spencer = {
  age: 22,
  country: "United States"

// make spencer2 here with constructor notation
var spencer2 = new Object(); {
    age = 22;
    country = "United States";


after you defined this object..

var spencer2 = new Object();

You have to use dot notation to add key: value pairs to your object spencer2..

Like adding age..

spencer2.age = 22;

same way add country key and its corresponding value .

one more thing..
Read the theory and instruction again.


I had the same problem @dragon_king001


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