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 www.codeproject.com #
 
PREVIOUS NEXT
Tagged: #JavaScript #Array #length
ADD COMMENT
Topic
Name
3+7 =