Ganti Elemen dalam Array TypeScript
const index: number = items.indexOf(element);
if (index !== -1) {
items[index] = newElement;
}
GaL
const index: number = items.indexOf(element);
if (index !== -1) {
items[index] = newElement;
}