Imagine this scenario in node:
var output = '';
module1.on('done', function() {
output += 'aaaa';
});
module2.on('done', function() {
output += 'bbbb';
});
// ...Doing stuff...
// Assume this is inside a promise/callback and executed after both events have fired
console.log(output);
Is it possible to ever get output like aabbaabb?