Maximum Area of Longest Diagonal Rectangle || JS || Solution by Bharadwaj
Code\n\nvar areaOfMaxDiagonal = function(dimensions) {\n    let maxLength = 0, maxArea = 0;\n    for(let i = 0; i < dimensions.length; i++){\n        let length
# Code\n```\nvar areaOfMaxDiagonal = function(dimensions) {\n    let maxLength = 0, maxArea = 0;\n    for(let i = 0; i < dimensions.length; i++){\n        let length = dimensions[i][0];\n        let width = dimensions[i][1];\n        \n        let diagonal = Math.sqrt(length ** 2 + width ** 2);\n        if(diagonal > maxLength || (diagonal === maxLength && length * width > maxArea)) {\n            maxLength = diagonal;\n            maxArea = length * width;\n        }\n    }\n    return maxArea;\n};\n\n```
['JavaScript']