var testArray = [];
var testImage = new Image();
testImage.src = "entities/left.png";
testArray.push({image: testImage, xpos: 100, ypos: 100, width: 100, height: 100});
console.log(testArray.image);
The output from the console.log says "undefined", if I log testArray[0] it says "image: img" in the image part. is there a way to push the actual img element into the array?