Given 2 integers, create 2d arrays of objects. First integer represents the amount of nested arrays, 2nd integer represents the amount of objects within each nested array.
solution(3,2)
// will return the following:
[
[{x: 0, y:0}, {x:1, y: 0}],
[{x: 0, y: 1}, {x:1, y: 1}],
[{x: 0, y: 2}, {x:1, y: 2}],
]
solution(99,2)
// will return the following:
[
[{x: 0, y:0}, {x:1, y: 0}],
[{x: 0, y: 1}, {x:1, y: 1}],
[{x: 0, y: 2}, {x:1, y: 2}],
...
[{x: 0, y: 98}, {x:1, y: 98}],
]