Skip to content

Instantly share code, notes, and snippets.

@vinyll
Created January 13, 2019 13:54
Show Gist options
  • Save vinyll/b961fe73c0f523a02df5ce87a273d16c to your computer and use it in GitHub Desktop.
Save vinyll/b961fe73c0f523a02df5ce87a273d16c to your computer and use it in GitHub Desktop.
A labyrinth in a single line of JS
<body style="line-height: 18px; font-size: 18px;border: 1px solid #000; display: inline-block">
<script>
document.write([...Array(30)].map(_ => [...Array(30)].map(_ => (Math.floor((Math.random() * 2) % 2)) ? '╱' : '╲').join('')).join('<br>'))
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment