I have a piece of JS code in for loop:
window.gamesParse = {
days: days,
dates: dates,
times: times,
series: series,
homes: homes,
aways: aways,
channels: channels
}
var image = $.get("assets/images/" + gamesParse.aways[i] + ".png");
if (image.status !== 404) {
console.dir(image);
} else {
console.dir(image);
}
Now, it returns the right Objects which have status
property. But if I change image
to image.status
(or any other property or method), it returns undefined.
Is it normal? How can I access status
property from there?