DEV Community

Discussion on: Understanding Ruby - Enumerable - Transformations

Collapse
baweaver profile image
Brandon Weaver Author

True, and easy to forget it does that. It also flattens collections:

[[1], 2, 3, [[[4, 5], 6], 7]].join(', ')
# => "1, 2, 3, 4, 5, 6, 7"
Enter fullscreen mode Exit fullscreen mode