Here's the class and object:
class BDImage
{
constructor(path)
{
this.img = new Image();
this.img.src = path;
}
}
var myImage = new BDImage("path/to/image.png");
I want to access/use myImage's img member without typing myImage.img all the time. Instead just myImage and then I'm actually referring to myImage.img.
How?
myImagetomyImage.img.