Created
January 23, 2013 17:37
-
-
Save scotthmurray/4610744 to your computer and use it in GitHub Desktop.
A simple JavaScript interpretation of the title of this book: https://mitpress.mit.edu/books/10-print-chr2055rnd1-goto-10-0 (Not as elegant as the original, I know.)
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
var numTimes = 100; | |
var r = ""; | |
var c = function() { | |
var rand = Math.random(0, 1); | |
if (rand < 0.5) { | |
return "/"; | |
} else { | |
return "\\"; | |
} | |
} | |
for (var i = 0; i < numTimes; i++) { | |
r = r + c(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment