Dapatkan elemen array javascript berikutnya

// A simple loop over an array:
array.forEach(element => {
  // do something with element
});

// If you really want to use next:
const array = ["one", "two", "three"];
const iterator = array.values();
iterator.next().value; // "one"
iterator.next().value; // "two"
I_Like_Cats__