Easy JS one liner
Code\n\nconst diagonalSum = mat => mat.reduce((sum, row, i) => sum + row[i] + row[row.length - i - 1], 0) - (mat.length % 2 ? mat[Math.floor(mat.length / 2)][Ma
# Code\n```\nconst diagonalSum = mat => mat.reduce((sum, row, i) => sum + row[i] + row[row.length - i - 1], 0) - (mat.length % 2 ? mat[Math.floor(mat.length / 2)][Math.floor(mat.length / 2)] : 0);\n\n```
['JavaScript']