Created
December 24, 2015 11:15
-
-
Save rasshofer/8f66012088ef6de87533 to your computer and use it in GitHub Desktop.
Merry Christmas!
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 = 20; | |
for (var i = 0; i < size; i += 2) { | |
var line = new Array((size - i) / 2 | 0).join(' '); | |
for (var y = 0; y <= i; y++) { | |
line += i ? (Math.random() * 10 % 10 | 0) === 0 ? ['🔴', '🔵'][y % 2] : '🍃' : '⭐️'; | |
} | |
console.log(line); | |
} | |
for (var z = 0; z < 2; z++) { | |
console.log(new Array(size / 2 - 1).join(' ') + new Array(4).join('🚪')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment