I would like to see an example of _.zip.apply
using underscore.js.
In the underscore documentation is written:
If you're working with a matrix of nested arrays, zip.apply can transpose the matrix in a similar fashion.
However, the documentation provides no example.
It's your standard use of
apply
:This would result in the following:
You can use also a 'non-external-library' method:
Create this function:
and then:
var transposedArray = transpose(originalArray);