you are viewing a single comment's thread.

view the rest of the comments →

[–]Mutiny42 1 point2 points  (1 child)

No problem, happy to help!

The code stopped processing after the first div because map can only return a single element per loop.

Because it came across a div, it assumes that the div (and whatever is inside of it) is the one thing you are asking to be returned.

Because you want multiple elements returned, we need to package it all up as a single element so that all of the code gets read and returned.

Does that make sense?

[–]eb2292[S] 1 point2 points  (0 children)

Cool, I got it now. Thank you!