Still it is there just for the hell of it, and looking into the lodash source code, it looks like the lodash developers are not just directly referencing the native method, as is the case with some of these methods.
Although this is a lodash post on _.concat, this is also a kind of post of concatenating arrays in general. Also although there might not be much of a point using _.concat by itself in light of the vanilla js Array.concat, diving deep into the source code _.concat uses some internal methods that are shared with related methods like _.flattenDeep.
For a basic example of the lodash concat method I think it would be a good idea to just start out with a few arrays that are just simple arrays of primitives such as numbers. So the _.concat method works by just calling the method, and then giving the arrays, and elements to combine into a new array that will be returned from lodash concat using the given source arrays and elements.
This can be any mixture of arrays and or values as well passing everything that I want tin order as arguments to the lodash concat method. Primitives like always will be copied by value rather than reference, however objects, will of course be references unless action is taken to prevent that so be careful about that when dealing with objects. However for the most part that is all there is to it, and this is often preferable to a more complex alternative that involves creating a new array, and looping. So then I might just want to expand this section with a few more examples of this lodash concat method, but now it is more about using the concat method with other methods, and various other situations that will come up when dealing with arrays and objects in general actually. There is after all only so much to write about when it comes to the concat method alone in lodash.
The concat method is rarely just used on its own, often the case is that I will need to do several things one of which would be concatenation of two or more arrays. When it comes to using lodash there are a few ways to go about chaining two or more lodash methods together, one of these options would be the lodash chain method. With that said in this example I am using the lodash chain method with the flatten method and concat to create a single array of just umbers from an array of arrays of numbers and just an array of numbers.
The vanilla js method Array.concat works in a very similar fashion, the only note worth difference would appear to be that is a prototype method of Array rather that a stand alone method that is given arguments like with _.concat.