Created
February 12, 2018 23:39
-
-
Save alejandrolechuga/856aacc3c653cd2bcccecc0ff4c6b558 to your computer and use it in GitHub Desktop.
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
function generateMatrix(n) { | |
var matrix = [] | |
for (var i = 0 ;i < n; i++ ) { | |
var row = [] | |
for (var j = 0; j < n; j++ ) { | |
row.push(0); | |
} | |
matrix.push(row); | |
} | |
return matrix; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment