D3.js | d3.merge() function
The d3.merge() function in D3.js is used to merge the two given array into a single array.
Parameters: This function accepts two parameters which are mentioned above and described below:
- Array1: This is the first array whose elements are going to be merged with array2.
- Array2: This is the second array whose elements are going to be merged with array1.
Return Value: It returns the merged single array.
Below programs illustrate the d3.merge() function in D3.js.
[10, 20, 30, 1, 2, 3]
[A, B, C, a, b, c]