How to get first element of an array in JavaScript

1 Answer

0 votes
const arr = ['javascript', 'php', 'c', 'c++'];

console.log(arr[0]); 




/*
run:

javascript

*/

 



answered May 25, 2021 by avibootz
...