Created
January 14, 2022 16:05
-
-
Save codergautam/b7d88f5b02a871440aae9021f38956a9 to your computer and use it in GitHub Desktop.
Transpose an array!
This file contains 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 = (m)=>m[0].map((_, i) => m.map(r => r[i])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment