D3.js zip() Function
The zip() function in D3.js is used to form a matrix from an array given as a parameter. It helps to visualize data. D3.js stands for Data-Driven Documents.
Parameters: This function accepts a single parameter as mentioned above and described below:
- arrays: This parameter holds the series of arrays.
Return Value: It returns the array of arrays.
Bellow examples illustrate the zip() function in D3.js:
Example 2: When nothing is given in the parameter an empty array is returned by the zip function.