Menu
Hi all, I’m building an app using a javascript framework and for days I’ve been scratching my head over some very strange behaviour. After searching for hours I think it boils down to this: when I initiate a new object, use it and populate it afterwards, this doesn’t seem to happen chronologically. When I execute this code, the object I can see in my console already has the field ‘foo’, even though it’s added afterwards. How can this happen?
`let foo = {}
console.log(foo)
foo.bar = “strange”
`
Thanks in advance!