interchangeableRectangles = (rectangles) => {

    let totalPair = 0;
    for (let i = 0; i < rectangles.length; i++) {
        for (let j = i + 1; j < rectangles.length; j++) {
            if (rectangles[i][1] / rectangles[i][0] === rectangles[j][1] / rectangles[j][0]) {
                totalPair++;
            }
        }
    }
    return totalPair;
}
Brute Force
Time O(N^2) | Space O(1)
https://leetcode.com/problems/number-of-pairs-of-interchangeable-rectangles
@param {number[][]} rectangles
@return {number}