Skip to content

Instantly share code, notes, and snippets.

@zevaverbach
Created September 27, 2018 20:15
Show Gist options
  • Save zevaverbach/46a4c417d74fac65844d479e52d61803 to your computer and use it in GitHub Desktop.
Save zevaverbach/46a4c417d74fac65844d479e52d61803 to your computer and use it in GitHub Desktop.
Generate Game of Life Board with arbitrary dimensions
generateGoL = (numRows, numCols) => {
return Array.from({length: numRows}, () =>
Array.from({length: numCols}, () =>
Math.round(Math.random())))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment