I have this simple javascript function to sum a date
console.log(this.state.birth_date) //logs birth date
var death_date = this.state.birth_date.setFullYear(this.state.birth_date.getFullYear() + this.state.years_to_live)
console.log(this.state.birth_date) //logs death date
console.log(death_date) //logs death date
How to avoid the birth date being set as death date after the death date is set?