Conway's Game of Life - in JavaScript

Read the following notes on John Conway's Game of Life.

This simple JavaScript implementation of the Game of Life is an exercise for COMP3001 students learning JavaScript. It is functional, but the source code has been minified to make it as obscure as possible. You are expected to use the students' starting point as the basis for your JavaScript implementation. It contains most of the code and comments, so you can see an example of a proper JavaScript program interacting with a web page in a style that used to be called "Dynamic HTML". You have to fill in the missing bits, signified by four question marks at various places ????.

This implementation of Conway's Game of Life uses a table of 10x10 cells to store and display the current board. An in-memory array is used to styore the state of each cell in the next generation. The link between table cell (i,j) and array value [i][j] is that the HTML table cell has an id "ij" (e.g. cell[4][5] -> <td id="45">).

0 1 2 3 4 5 6 7 8 9
2     X X X          

Your challenges: