Take the following function
function test(callbackFn) {
for (var i = 1; i < 10; i++) {
for (var k = 1; k < 100; k++) {
callbackFn(i, k);
}
}
}
The intention of function test is that it should call the callbackFn as follows
callbackFn(1, 1); callbackFn(1, 2)...callbackFn(1, 100);
callbackFn(2, 1); callbackFn(2, 2)...callbackFn(2, 100);
...
I would like to refactor out the for loops. Is there a suitable RxJs operator which would allow me to do this?
I have looked at the zip, concat and merge operators but they don't seem to suit the use case.
Any suggestions or tips would be greatly appreciated.