3 ms·
I tried a JS version, but first I locked my browser window (lol, while (true)), then used console.log which in a browser will always do a newline and deduplicat
by Cthulhu_ 9y ago
I tried a JS version, but first I locked my browser window (lol, while (true)), then used console.log which in a browser will always do a newline and deduplicate double logs, then used a string concatenation and the result just isn't as interesting, nor the code as sexy. Note also that ascii codes are different, so no magic with floats and such.
var str = ''
for (var i = 0; i < 1000; i++) {
Math.random() > 0.5 ? str += '/' : str += '\\'
}
console.log(str)