var hp = 100;
function damage( point){
hp = hp - point;
}
damage( 100);
console.log( hp);
var ship = {
hp: { cur: 100, max: 100},
damage: function( point){
this.hp.cur = this.hp.cur - point;
return this.hp;
}
}
var hp = ship.damage( 10);
console.log( hp);