Created
March 22, 2021 14:56
-
-
Save ricardodantas/53082a5fbf763447f0910dd7f845cb99 to your computer and use it in GitHub Desktop.
Transpose 2D array (ES6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const transpose = a => a[0].map((_, c) => a.map(r => r[c])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment