EN
JavaScript - get first element of array
0 points
In this article, we would like to show you how to get the first element of an array in JavaScript.
Quick solution:
xxxxxxxxxx
1
const array = ['a', 'b', 'c'];
2
3
const firstElement = array[0];
4
5
console.log(firstElement);