Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

8.1.4. Array Length or .length

/*What is the length of the two arrays?
Hint: look closely at the quotes in the classes array.*/

let classes = ["science, computer, art"];
console.log(classes.length); 
//1

let teachers = ["Jones", "Willoughby", "Rhodes"];
console.log(teachers.length); 
//3
Source by education.launchcode.org #
 
PREVIOUS NEXT
Tagged: #Array #Length
ADD COMMENT
Topic
Name
4+4 =