Skip to content

Instantly share code, notes, and snippets.

@nqxcode
Created March 14, 2019 21:01
Show Gist options
  • Save nqxcode/0b889a095263e5648b6da1d14c038622 to your computer and use it in GitHub Desktop.
Save nqxcode/0b889a095263e5648b6da1d14c038622 to your computer and use it in GitHub Desktop.
Javascript flipMatrix
function flipMatrix(matrix) {
return matrix[0].map(function(column, index) {
return matrix.map(function(row) {
return row[index];
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment