Beated 99% || Javascript || Easy to understand
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {number[][]} mat\n * @return {number}\n */\nvar diagonalSum = function (mat) {\n    let sum = 0\n    let n = mat.length - 1\n    for (let i = 0; i <= n; i++) {\n        sum = sum + mat[i][i]\n        if (i !== (n - i)) {\n            sum = sum + mat[i][n - i]\n        }\n    }\n    return sum\n};\n```
['Array', 'Two Pointers', 'Matrix', 'JavaScript']