When I do a sum of numbers, it returns them together, as if they were text strings, does anyone know what I'm doing wrong?
//Creating the class class Persons { constructor(name, age, email, city, working){ this.name = name; this.age = age; this.email = email; this.city = city; this.working = working; } //Method to see the characteristics of the user show() { console.log("Name: " + this.name); console.log("Age: " + this.age); console.log("Email: " + this.email); console.log("City: " + this.city); console.log("Working: " + this.working); } } //Saving objects in variables const person1 = new Persons("Max", 24, "example@gmail.com", "Washington", true); const person2 = new Persons("Matt", 21, "example@gmail.com", "Portland", true); console.log(person1.show()); console.log(" "); console.log(person2.show()); //To see the sum of ages function sumAge(age) { let agePeople = { age1: person1.age, age2: person2.age }; console.log("The sum of ages is: " + agePeople.age1 + agePeople.age2); } sumAge();