Shortest One Line Method
Intuition\nI\'ve just used usual functions for arrays - map and reduce with validation for diagonal-cross element\n\n# Code\n\nvar diagonalSum=(mat,n=mat.length
# Intuition\nI\'ve just used usual functions for arrays - map and reduce with validation for diagonal-cross element\n\n# Code\n```\nvar diagonalSum=(mat,n=mat.length)=>mat.map((l,i)=>l[i]+(n-2*i-1?l[n-i-1]:0)).reduce((x,y)=>x+y);\n```
['JavaScript']