Driver program to test above function
let cell = new Array ( 3 ) ; for ( let i = 0 ; i < 3 ; i ++ ) { cell [ i ] = new Array ( 2 ) ; } cell [ 0 ] [ 0 ] = new Cell ( 0 , 1 ) ; cell [ 0 ] [ 1 ] = new Cell ( 2 , 0 ) ; cell [ 1 ] [ 0 ] = null ; cell [ 1 ] [ 1 ] = new Cell ( 1 , 0 ) ; cell [ 2 ] [ 0 ] = new Cell ( 2 , 1 ) ; cell [ 2 ] [ 1 ] = new Cell ( 1 , 1 ) ; document . write ( isAllCellTraversed ( cell ) ) ;