8 1 2 Array Length¶

[Solved] 8 1 2 Array Length¶ | Solidity - Code Explorer | yomemimo.com
Question : 8.1.2. Array Length¶

Answered by : tough-tortoise-g8cu0kuxldk4

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

Source : https://education.launchcode.org/js-independent-track/chapters/arrays/arrays-are-like-strings.html | Last Update : Mon, 21 Jun 21

Answers related to 8 1 2 array length¶

Code Explorer Popular Question For Solidity