- content_for(:title) { 'Sudoku' } h1 Sudoku #board script type="text/javascript" src="/sudoku.js" javascript: document.addEventListener("DOMContentLoaded", function() { var game = [ [3,7,9,-5,-2,-6,-8,1,4], [-5,6,-4,-3,1,-8,-9,7,-2], [-2,8,-1,-4,-7,9,-3,-6,5], [4,3,5,-2,-6,7,-1,-9,-8], [-6,9,-8,-1,4,-3,-5,2,-7], [-7,-1,-2,8,-9,-5,4,3,6], [9,-2,-3,7,-5,-4,-6,8,-1], [-1,4,-6,-9,8,-2,-7,5,-3], [8,5,-7,-6,-3,-1,2,4,9] ]; sudoku = new Sudoku(document.getElementById('board')); sudoku.generate(game); });