* fix: restructure certifications guide articles * fix: added 3 dashes line before prob expl * fix: added 3 dashes line before hints * fix: added 3 dashes line before solutions
536 B
536 B
title
title |
---|
Access Array Data with Indexes |
Access Array Data with Indexes
Hints
Hint 1
The first element of an array is at position zero. So, if you want to access the first element of an array, you can do it like so:
var arr = ["Programming", 123, "Coding", 789];
var firstElem = arr[0]; // This is "Programming"
var thirdElem = arr[2]; // This is "Coding"
var fourthElem = arr[3]; // This is 789
Notice that the length of the array is 4, and the position of the last element of the array is 3.