JS contoh menghapus elemen array dg delete

by istiq20

JavaScript

const buah = ['pisang', 'apel', 'mangga'];

delete buah[1];

console.log(buah); // Output: ["pisang", undefined, "mangga"]