Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • I found I had to do a mapping twice to get what I wanted. The first map call 'x' is a A[]. But I need to change each A into a B so I mapped x and returned a new B using the y variable in the second map. Is there a better way? .map(x => x.map(y => <B>{ foo: bar })) Commented Nov 7, 2017 at 17:07
  • I think you can return also .map(x => x.map(y => { foo: bar })) as B[] which is maybe more readable Commented Nov 7, 2017 at 21:46