![]() |
VOOZH | about |
Lodash _.concat() function is used to concatenate the arrays in JavaScript. and it returns the new concatenated array.
_.concat(array, [values]);Note: The array value can also contain arrays of an array or simply a single object to be added to the original array.
Example 1: In this example, we are concatenating two arrays having numbers and string as a value by the use if the _concat() method.
Output:
👁 ImageExample 2: In this example, we are concatenating two arrays having numbers,strings and sub array as a value by the use if the _concat() method.
Output:
👁 ImageExample 3: In this example, we are concatenating two arrays having numbers, strings, and object as a value by the use if the _concat() method.