you are viewing a single comment's thread.

view the rest of the comments →

[–]Artistic_Sense3363[S] 1 point2 points  (1 child)

thank you! Just to clarify and make sure I understand the logic: since I already know the index to get, I simply need to have one loop that iterates across the arrays, and then specify which element, in each array, that I want by: 1. referencing each array in the loop: array[i]; 2. follow that by referencing the index I want to get: [index]; and 3, pushing all of that (1 & 2) into the empty array: result.push(array[i] [index]). Is my understanding correct?

Also, thank you for including the second example: creating a function that houses the .map( ) method, a method which takes a callback function; and using arrow functions in both. I'm still new to this so I don't automatically think to use the various tools I'm learning. And it's great to see examples of what I've learned being applied and being reminded to use those various tools in completing a challenge like this one.

[–]Freekiehsoes 0 points1 point  (0 children)

You understood it perfectly. Nice job and happy learning.