In JavaScript, an array index starts with zero (0).
This means JavaScript starts counting from zero when it indexes an array.
The index value of the first element of the array is 0 and the index value of the second element is 1, the index value of the third element is 2 and so on.
const colors = ["Red", "Blue", "Green", "Yellow", "Pink"];
We can access the first element of the above array by referring to the index number 0.
console.log(colors[0]);
Comments (0)