Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Array length

const dailyActivities = [ 'eat', 'sleep'];

// this gives the total number of elements in an array
console.log(dailyActivities.length); // 2
Source by flexiple.com #
 
PREVIOUS NEXT
Tagged: #JavaScript #Array #length
ADD COMMENT
Topic
Name
8+9 =