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:
// ONLINE-RUNNER:browser;
const array = ['a', 'b', 'c'];
const firstElement = array[0];
console.log(firstElement);