Skip to content

Instantly share code, notes, and snippets.

@jlcarvalho
Created April 9, 2015 20:40
Show Gist options
  • Save jlcarvalho/d417cc091eb5eb8be1cb to your computer and use it in GitHub Desktop.
Save jlcarvalho/d417cc091eb5eb8be1cb to your computer and use it in GitHub Desktop.
Gistter: Labyrinth generated with JavaScript
for (var line=1; line<60; line++) {
for(var i=1;i<29;i++) {
var s = (Math.floor((Math.random()*2)%2)) ? "╱" : "╲";
document.write(s);
}
document.writeln("<br>");
}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Gistter</title>
<!-- Necessary to insert the styles -->
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<!-- Your code here -->
<!-- Necessary to insert the javascript -->
<script type="text/javascript" src="app.js"></script>
</body>
</html>
body {
line-height: 18px; font-size: 18px; font-family: times;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment