Question - How to create an object using JavaScript?
Answer -
Objects can be created in many ways. One way is to create the object and add the fields directly.
This produces
aliens:[object Object]
You can also use an abbreviated format for creating fields using a ":" to separate the name of the field from its value. This is equivalent to the above code using "this.".
This produces
aliens:[object Object]