Skip to content

Instantly share code, notes, and snippets.

View supertinou's full-sized avatar

Martin Lagrange supertinou

  • Typeform
  • San Francisco
View GitHub Profile
@supertinou
supertinou / 0_reuse_code.js
Created June 24, 2016 17:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
function getNbs(i,j, board){
let coords = []
for (let ii = i-1; ii<= i+1; ii++){
for (let jj = j-1; jj<= j+1; jj++){
const inbound = ii >= 0 && ii < board.length && jj >= 0 && jj < board[0].length
if (inbound){
coords.push([ii, jj])
}