What console log can be after this code will be executed?
var img = new Image;
img.onload = function() { console.log('B'); };
img.src = 'image.jpg';
for (var i=0;i<100000;i++) {
console.log('A');
}
I know, that most likely it will be A...AB
.
But can it be A...B...A
or BA...A
? For example, if image.jpg is very small file and connection is very fast.