Hello, I’ve come across this technique for creating objects on youtube called the “Object Initializer” and am very confused as to why it yields these results when console logged.
Here is the syntax:
objectName = {property: value,}
From what I understand, this should create an object, within the global scope of JS that has a given set of properties. However, when I attempt to console.log the object, I am presented with this.
This video shows the Object initializer in action.
I appreciate the help