Maybe JavaScript Iddna Me Bain

It was late and I was pretty caffinated up and had a laptop but no Internet. So I figured I’d practice trying to code a game of life from scratch, just using what scraps of code I could find on the hard drive as reference. Of course there is always some refresher I need to do. But, I was happy to figure out document.createElement() and appendChild() to build arrays of divs from nested for loops. Creating objects is always a little weird, but using curlies and a factory method I avoid the need to do things like say “new Cell()”, obviously I need to read up on that. And of course I had to figure out setTimeout() again, too. All worth it.

Advertisements