print all diagonal of a matrix in javascript code example Example: diagonal javascript matrix for (let j = 0; j < array[i].length; j++)