In javascript there are two ways to create arrays and objects , they can be created using literal objects:
new Array()
- Object - arrangement new Object()
- Object - object or they can be created from their primitive objects which are:
[]
- Object - arrangement {}
- Object - object What is the difference between using the literal object to use the primitive object?
I understand that for the
new Array()
, the constructor can receive a parameter to define the propertylength
of the created array, but is this the only difference?