JS: Create Object
There are 3 common ways to create data object.
Object literal expression
Most useful, when you want to use it as a set of key-and-value pairs for data.
Object.create()
Most powerful and flexible way to create object, because you can specify parent object, properties, property attributes, all in one function call.
Create object by new (operator)
complex behavior. For some standard objects, such as Date, it's the only way to create it.
Note: remember that function and array are also objects. So, when you define a function or create a array , you are also creating objects.