Driver program to test above functions
let mat = [ [ 1 , 0 , 0 , 1 ] , [ 0 , 0 , 1 , 0 ] , [ 0 , 0 , 0 , 0 ] ] ; document . write ( " " ) printMatrix ( mat , 3 , 4 ) ; modifyMatrix ( mat , 3 , 4 ) ; document . write ( " " ) ; printMatrix ( mat , 3 , 4 ) ;