So I have this code which inherits :
enemy = new Object(hawk);
The parent is this:
function CreateEnemy(name, health, damage){
this.name = name;
this.health = health;
this.damage = damage;
}
var hawk = new CreateEnemy("Hawk", 200, 20);
Whenever I do
enemy.health -= 10;
It changes the value of hawk.health as well, and I don't want it to do that.