Here is my code:
var health = prompt("Type in health");
var attack = prompt("Type in attack");
var defense = prompt ("Type in defense");
function calculatestats(health,attack,defense){
return health/4 + attack + defense
}
alert (calculatestats(health,attack,defense));
I want to make it output "3" when I type in 4, 1, and 1. The javascript is adding the characters, "1", "1", and "1". I want to add it Mathematically, and make it output 3, not 111. Thank you.