DEV Community

Discussion on: 5 Must Know Lodash Methods

Collapse
 
bukazoltan profile image
bukazoltan

I don't know anything about ruby on rails but isn't that concat? w3schools.com/jsref/jsref_concat_a...

Thread Thread
 
camskithedev profile image
Cameron Lucas

It's a little different concat would join the two arrays. So if you had [1, 3, 5] and [2, 4]. The results of concatenation would be [1, 3, 5, 2, 4]. The zip method would zip the two arrays together like a zipper. The results would look like this [1, 2, 3, 4, 5]

Thread Thread
 
bukazoltan profile image
bukazoltan

So basically concat + sort?