Driver Code
let N = 4 ; let mat = [ [ 1 , 0 , 0 , 0 ] , [ 0 , 1 , 0 , 0 ] , [ 0 , 0 , 1 , 0 ] , [ 0 , 0 , 0 , 1 ] ] ; if ( isIdentity ( mat , N ) ) document . write ( " " ) ; else document . write ( " " ) ;