JavaScript by Radu TM • June 21, 2022
const array = ['🍎', '🍌', '🍇', '🍈'];
// to get the length of an array in JavaScript, use the .length property:
console.log(array.length); // 4
0
17.903
JavaScript by Radu TM • June 21, 2022
// declare and initialize array
const array = [1, 2, 3, 4, 5];
console.log(array.length); // 5
0
17.903
JavaScript by Radu TM • June 21, 2022
const array = ['😃', '😄', '😁', '😆'];
// array.length will give us the number of items in the array
console.log(array.length); // 4
0
17.903