So I'm making a simple html5 Canvas game for educational purposes. I have an array which holds all of the separate prototypes of the same enemy object. When the enemy goes off the screen or perhaps is killed by player, I want to be able to despawn it from within the object by deleting it altogether from the array. I'll probably create new instances of the enemy by pushing a new object to the array with some pseudo-random properties.
I apologize for not providing code, if you'd like to see anything specific just ask.