If I have an array of objects is there any way possible for the item to splice itself out of the array that contains it?
For example: If a bad guy dies he will splice hi
Assuming the bad guy knows what list he's in, why not?
BadGuy.prototype.die = function() { activeEnemies.splice(activeEnemies.indexOf(this), 1); }
By the way, for older browsers to use indexOf on Arrays, you'll need to add it manually.
indexOf