Big O 4th Rule
// Log all pairs of array i.e. [1,1], [1,2] [1,3] [2,1] [2,2] etc
const boxes = [1,2,3,4,5];
function logArrayPairs(array) {
for (let i = 0; i < array.length; i++) {
for (let j = 0; j < array.length; j++) {
console.log(array[i], array[j])
}
}
}
logArrayPairs(boxes);
// O(n) * O(n) = O(n^2) : Quadratic times
// nested is multiplied INFO