const services = ['Design', 'Dezvoltare', 'SEO'];
const second = services[1];
console.log(second);Index 1 points to “Dezvoltare”.
LESSON 36 OF 50
Access the second element of an array.
Array indices start at 0. Therefore, the second element is read with index 1.
const services = ['Design', 'Dezvoltare', 'SEO'];
const second = services[1];
console.log(second);Index 1 points to “Dezvoltare”.
const second = 'Dezvoltare';
console.log(second);The value is copied manually rather than read from the array.
Store services[1] in second and print the variable.
Run the code to see the result.Indexed access reads the actual value from the second collection position.
ANALYSIS REQUEST
The initial discussion is without obligation. You receive an honest recommendation, suitable stages and the factors that affect price.