Using Array.length to Determine the Number of Elements in Javascript


Find out how many elements an array contains.

Source Code

let fruits = ["apple", "banana", "cherry"];
console.log(fruits.length); // 3
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments