Im a complete beginner in programming and I need some help. Im doing an exercise where we have 3 players. Each one must input a height and an age. The winner is then decided based on total score of height + 5 * age. My program works but my calculations are wrong (and higher). So for example. Lets say that heightJohn = 10 and ageJohn = 1. That should mean that totalJohn is 15 right? If I assign 10 and 1 without the prompt the totalJohn really is 15. But when I use prompt, somehow my console displays that totalJohn = 105. I really dont understand how and why? Can someone enlighten me, I cant figure out what Im doing wrong.
let heightJohn = prompt("What is Johns height?");
let ageJohn = prompt("What is Johns age?");
let heightBob = prompt("What is Bobs height?");
let ageBob = prompt("What is Bobs age?");
let heightMichael = prompt("What is Michaels height?");
let ageMichael = prompt("What is Michaels age?");
let totalJohn = (heightJohn + 5 * ageJohn);
let totalBob = heightBob + 5 * ageBob;
let totalMichael = heightMichael + 5 * ageMichael;
console.log(ageJohn);
console.log(heightJohn);
console.log(totalJohn);
console.log(totalBob);
console.log(totalMichael);
if(totalJohn > totalBob && totalJohn > totalMichael) {
console.log("John is a winner with the score of " + totalJohn)
} else if(totalBob > totalJohn && totalBob > totalMichael) {
console.log("Bob is a winner with the score of " + totalBob)
} else if(totalMichael > totalJohn && totalMichael > totalBob) {
console.log("Michael is a winner with the score of " + totalMichael)
} else if(totalJohn === totalBob === totalMichael) {
console.log("Its a draw with the score of " + totalMichael)
} else {
console.log("Wrong input");
}