Having trouble with this problem. Don’t understand how it is not taking my code. I am telling it that hp is health - damage and if hp is less than 0, return Health cannot go below 0
function combat(health, damage) {
const hp = health - damage;
console.log(hp);
if (hp > 0) {
return hp;
}
else {
return 'Health cannot go below 0';
}
}
Thank you for the codewars link. I would still play, but I’m currently learning Python. I don’t have time to brainstorm. My motto is “simplicity” in everything.