repl.it
@GarethDwyer1/

ThistleChillyTruespace

Nodejs

No description

fork
loading
Files
  • index.js
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function t(board) {
    const top = board[1 - 1] || undefined
    board[0][0] = 1;
    console.log(top);
}

var board1 = [
    [ 0,  0,  0, 0, -1 ],
    [ 0, -1, -1, 0,  0 ],
    [ 0,  0,  0, 0,  0 ],
    [ 0, -1,  0, 0,  0 ],
    [ 0,  0,  0, 0,  0 ],
    [ 0,  0,  0, 0,  0 ],
];

t(board1)
Fetching token
?