Okay, so I figured out my original problem. But now I have an even bigger problem.
First of all, I am trying to make a javascript implementation of Conway's Game of Life(CGoL). Now, for CGoL to work, you have to update all of the squares once, and only once without letting an update of an adjacent square impact it. Basically, I have to update all of the squares at the same time. How do I do that?