Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Game Script</title>
</head>
<body>
  
  <script type="text/mygamelevel" id="level1">
    0010011001111011
    0011011100010
    10101110111101101
  </script>
  
  <script type="text/javascript">
    var level = document.getElementById("level1").text;
    var lines = level.split("\n");
    for (var i=0; i<lines.length; i++) {
      var line = lines[i];
      if (!line.trim()) continue;
      
      alert(line);
    }
  </script>
  
  
  
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers