Length Property
The length property of an array returns the number of elements it contains. It can also be used to truncate an array.
const fruits = ['Apple', 'Banana'];
console.log(fruits.length); // Output: 2
fruits.length = 1; // Truncating the array
console.log(fruits); // Output: ['Apple']