what are you populating your array with?
also you are missing a closing ) on that loop
for (var i=0; i<myArray.length; i++*)* {
  console.log(myArray[i]);
}

On Monday, August 21, 2017 at 9:56:11 AM UTC-7, nicolas duminil wrote:
>
> Hello,
>
> I'm trying to iterate through an Array, as follows:
>
> myArray = new Array<MyStuff>();
> ...
> console.log(myArray);
> console.log("*** myArray.length", myArray.length);
> for (let m of myArray) {
>   console.log(m);
> }
>
> Running this code, correctly displays the content of myArray array, there 
> are 7 MyStuff elements. However, there are none lines displayed in the for 
> ... of loop an,d the displayed value of myArray.length is "undefined". 
>
> I even tried:
>
> for (var i=0; i<myArray.length; i++ {
>   console.log(myArray[i]);
> }
>
> but no luck neither.
>
> Could someone shed some light and explain me what the hell is happening 
> here ?
>
> Many thanks in advance,
>
> Nicolas  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to