QP School
JavaScript exercises and solutions - Iterating through an array with keys and values - 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 exercises and solutions - Iterating through an array with keys and values (/showthread.php?tid=4101)



JavaScript exercises and solutions - Iterating through an array with keys and values - Qomplainerz - 04-04-2023

Code:
const Games =
      [
        "Assetto Corsa",
        "Assetto Corsa Competizione",
        "rFactor",
        "rFactor2",
        "Kart Racing Pro",
        "KartKraft",
        "vRally",
        "WRC 10",
        "F1 2023",
        "F1 2022",
        "F1 2021",
        "F1 2020",
        "F1 2019",
        "F1 2018",
        "F1 2017",
        "F1 2016",
        "F1 2015",
        "F1 2014",
        "F1 2013",
        "F1 2012",
      ];

for(i = 0; i < Games.length; i++)
  {
    document.write(i + " ");
    document.write(Games[i] + "<br>");
  }