Lesson 12


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 + 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?


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


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?


Yes, that solved it thanks for the help!