Lesson 12


#1

This is my code.

var object1 = {
color: "green",
shape: "triangle"
};
var object2 = {
color: "blue",
shape: "circle"
};
var object3 = {
color: "red",
shape: "square"
};
console.log(object1);
console.log(object2);
console.log(object3);
console.log(object1 + object2 + object3)

this is what the console brings up

{ color: 'green', shape: 'triangle' }
{ color: 'blue', shape: 'circle' }
{ color: 'red', shape: 'square' }
[object Object][object Object][object Object]

the first 3 are correct but the last one isn't why didn't it work?


#2

on the last console.log I forgot to use a semicolon but I tried to fix it and it does nothing.


#3

I replaced your last console.log with this:
console.log(object1, object2, object3);

and it produced this result:
{ color: 'green', shape: 'triangle' } { color: 'blue', shape: 'circle' } { color: 'red', shape: 'square' }

Is this what you were looking for?


#4

Yes, that solved it thanks for the help!