So I just spent the last three hours setting this up, I thought I tried it, I thought it worked. But now, that I've done it with most of my code I realize that it doesn't work...
I wanted to be able to add BISH.ship[x] and then use this.ship[x].actor...
But I've noticed I'm just getting "prototype" as an index and then the prototype contains the objects.
Here is the full object before adding anything to the array.
This is the object with ship[1] set to 42. Along with what BISH.ship[1] returns/contains and what autocompletes appear, without any of the objects I thought I was adding 🙁
Is there anything I can do to fix it except turning it into a function and looping it for each new index?
Best regards!
JavaScript:
BISH.ship = [];
BISH.ship.prototype = Object.prototype;
BISH.ship.prototype.actor;
BISH.ship.prototype.id;
BISH.ship.prototype.picId;
BISH.ship.prototype.name;
BISH.ship.prototype.skin;
I wanted to be able to add BISH.ship[x] and then use this.ship[x].actor...
But I've noticed I'm just getting "prototype" as an index and then the prototype contains the objects.
Here is the full object before adding anything to the array.
This is the object with ship[1] set to 42. Along with what BISH.ship[1] returns/contains and what autocompletes appear, without any of the objects I thought I was adding 🙁
Is there anything I can do to fix it except turning it into a function and looping it for each new index?
Best regards!