showing results for - "8 1 2 array length c2 b6"
Roberta
09 May 2017
1/*To check the length of an array, use the length property, just like
2with strings. JavaScript array length is NOT fixed, meaning you can
3add or remove items dynamically.*/
4
5//Print out the length of two arrays.
6let emptyArray = [];
7console.log(emptyArray.length);
8
9let programmingLanguages = ["JavaScript", "Python", "Java", "C#"];
10console.log(programmingLanguages.length);
11
12//0
13//4
Evann
09 Feb 2017
1/*What is the length of the two arrays?
2Hint: look closely at the quotes in the classes array.*/
3
4let classes = ["science, computer, art"];
5console.log(classes.length); 
6//1
7
8let teachers = ["Jones", "Willoughby", "Rhodes"];
9console.log(teachers.length); 
10//3