Practice makes perfect


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

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

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

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


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


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


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

console.log(" ");

To the end of your code.