JS solution
Intuition\n Describe your first thoughts on how to solve this problem.  Loop over given array and apply the given formula in each sub array. If the square root 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. --> Loop over given array and apply the given formula in each sub array. If the square root is higher than the previous saved square root update with new value and also update the area. If same square root is found then return the value whose area is larger than the other.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nLoop over given array. Apply the given formula on each subarray and find the largest sqrt. If largest is found return its area, but if there is a tie, then return the highest area of a rectangle.\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ --> \n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```javascript []\n/**\n * @param {number[][]} dimensions\n * @return {number}\n */\nvar areaOfMaxDiagonal = function(dimensions) {\n    let area = 0;\n    let total = 0;\n    for(let i=0;i<dimensions.length;i++){\n       let sqrt = 0;\n       sqrt = Math.sqrt((dimensions[i][0] * dimensions[i][0]) + (dimensions[i][1]*dimensions[i][1]));\n      if(sqrt > total){\n        total = sqrt;\n        area = dimensions[i][0]*dimensions[i][1]\n       }\n       if(sqrt === total){\n        if(dimensions[i][0]*dimensions[i][1] > area){\n            area = dimensions[i][0]*dimensions[i][1]\n        }\n       }\n    }\n    return area;\n};\n```
['JavaScript']