QP School
JavaScript - Get the length of an array - 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 - Get the length of an array (/showthread.php?tid=4093)



JavaScript - Get the length of an array - Qomplainerz - 04-04-2023

Code:
const countries = [];

countries[0] = "Norway";
countries[1] = "Sweden";
countries[2] = "Finland";
countries[3] = "England";
countries[4] = "Scotland";
countries[5] = "Ireland";

document.write(countries.length);