8 1 4 array length or length

Solutions on MaxInterview for 8 1 4 array length or length by the best coders in the world

showing results for - "8 1 4 array length or length"
Nicole
15 Feb 2016
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
Rania
08 Oct 2018
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