Last active
September 11, 2018 13:11
-
-
Save trufa/cc3bd3ef314ce973c21c73bcc2ecdb29 to your computer and use it in GitHub Desktop.
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 col = 3; | |
const row = 3; | |
const listOfPos = []; | |
for (var i = 0; i < row; i++) { | |
for (var j = 0; j < col; j++) { | |
listOfPos.push({ | |
x: j, | |
y: i, | |
}); | |
} | |
} | |
console.log(listOfPos); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment