Created
January 13, 2016 17:43
-
-
Save TimBlock/6e93833e66f6189b6012 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
| var size = 8; //this is the variable setting | |
| var board = ""; | |
| for (var y = 0; y < size; y++) { | |
| for (var x = 0; x < size; x++) { | |
| if ((x + y) % 2 == 0) | |
| board += " "; | |
| else | |
| board += "#"; | |
| } | |
| board += "\n"; | |
| } | |
| console.log(board); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment