Practice makes perfect


#1

Code is correct apparently, but it only prints the last object key, so console prints Bali in this case.. How come??

var object1 = Object
object1.name = "Robert",
object1.age = 29,
object1.city = "Berlin",
object1.home = "Amsterdam"

var object2 = Object
object2.name = "Anna",
object2.age = 34

var object3 = Object
object3.city = "Amsterdam"
object3.dream = "Bali"


#2

The console echos the last value you assigned. :slight_smile:


#3

So this is standard, and is always the case? How come?


#4

This is just JavaScript behavior. You can easily remove by adding:

console.log(" ");

To the end of your code.