QP School
JavaScript Array entries() example - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: JavaScript Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=6)
+--- Thread: JavaScript Array entries() example (/showthread.php?tid=4088)



JavaScript Array entries() example - Qomplainerz - 04-04-2023

Code:
const fruits =
      [
        "Banana",
        "Orange",
        "Apple",
        "Mango"
      ];

const f = fruits.entries();

for(let x of f)
  {
    document.getElementById("demo").innerHTML += x;
  }