initialise N
let N = 3 ; let dp = [ ] ; for ( let i = 0 ; i < N + 1 ; i ++ ) { let temp = [ - 1 ] for ( let j = 0 ; j < 2 ; j ++ ) { temp . push ( [ - 1 ] ) } dp . push ( temp ) } if ( divisorGame ( N , 1 , dp ) == true ) document . write ( " " ) ; else document . write ( " " ) ;