Hey I have an object and I do not want to mutateit and from what I understand replace does not do that. I am trying to replace a value in the object in the string with something else
Class
export const customer = {
address: 'You live in addressCity',
name: 'customerName',
};
ts file
var city = 'Brazil';
this.customer.address = this.customer.address.replace('addressCity', this.city);
What can I do to not mutate and still change the customer address in the ts file