“8.1.4. Длина массива или.” Ответ

8.1.2. Длина массива

/*To check the length of an array, use the length property, just like
with strings. JavaScript array length is NOT fixed, meaning you can
add or remove items dynamically.*/

//Print out the length of two arrays.
let emptyArray = [];
console.log(emptyArray.length);

let programmingLanguages = ["JavaScript", "Python", "Java", "C#"];
console.log(programmingLanguages.length);

//0
//4
Tough Tortoise

8.1.4. Длина массива или.


int a[7];
std::cout << "Length of array = " << (sizeof(a)/sizeof(*a)) << std::endl;

Different Dugong

8.1.4. Длина массива или.

/*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
Tough Tortoise

Ответы похожие на “8.1.4. Длина массива или.”

Вопросы похожие на “8.1.4. Длина массива или.”

Больше похожих ответов на “8.1.4. Длина массива или.” по JavaScript

Смотреть популярные ответы по языку

Смотреть другие языки программирования