When I directly set vm.files in my view using the following code:
<input type="file" ng-model= vm.files[0]>
<input type="file" ng-model= vm.files[1]>
The contents of vm.files are displayed as shown in example A:
https://i.stack.imgur.com/K3V6p.png
However, I require it to be like example B:
https://i.stack.imgur.com/RDLcI.png
To achieve the desired structure in example B, I have to execute vm.files = new Array()
in my controller.
I am curious about the distinction between the arrays shown in example A and example B?
Is there a difference or multiple types of arrays in JavaScript?