angular 8 array replace string code example
Example: replace element in array typescript
const index: number = items.indexOf(element);
if (index !== -1) {
items[index] = newElement;
}
const index: number = items.indexOf(element);
if (index !== -1) {
items[index] = newElement;
}