Here is a snippet of my code:
Using Typescript:
console.log(this.arr);
myService.getData(). then(data =>{
console.log(this.arr);
this.arr[0].myData = data;
});
When I check the logs in Chrome, here's what I see: 1. arr.length=1 - indicating that the array has been Initialized 2. undefined