I'm using bluebird in NodeJS. I want to do a nested loop. Something like this:
for (var i = 0; i < array.length; i++) {
for (var j = 0; j < array.length; j++) {
if (i !== j) {
// do some stuff
}
}
}
How can I promisify this loop with bluebird?
I see some similar question here How to use promise bluebird in nested for loop? or here in node.js, how to use bluebird promise with a for-loop
But that does not clarify my doubt. I would like some explanation besides the code, since I do not really understand what I'm doing.
Thanks in advance!