Skip to content

Instantly share code, notes, and snippets.

@alexpilugin
Created July 9, 2017 10:05
Show Gist options
  • Save alexpilugin/845135c4b147ab8595cf69cebe2c0445 to your computer and use it in GitHub Desktop.
Save alexpilugin/845135c4b147ab8595cf69cebe2c0445 to your computer and use it in GitHub Desktop.
var log = console.log;
var number = 8;
var line = " ";
var counter = 0, counter2 = 0;
while (counter < number-1) {
counter++;
line = counter % 2 ? " " : "#";
counter2 = 0;
while (counter2 < number-1) {
var letter = (line[counter2] == " ") ? "#" : " ";
line += letter;
counter2++;
}
log(line);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment