Created
December 22, 2018 07:08
-
-
Save tuckcodes/60c8827f62d796a5e523e3108d99bbbb to your computer and use it in GitHub Desktop.
Make a chess board kinda thing with a row amount parameter
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
// Chess Board | |
// Create a chess board with a congigurable row amount parameter | |
let size = prompt(Number("How many rows?")), board = "# # # #"; | |
for (let count = 0; count < size; count++) { | |
if (count%2==0) { | |
console.log(" " + board) | |
} else { | |
console.log(board); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment