length property of an array represent in JavaScript?length property shows how many elements are in the array. It tells you the total number of items stored.If you have <code>let arr = [1, 2, 3, 4];</code>, what is <code>arr.length</code>?arr.length is 4 because there are 4 elements in the array.length property of an array? What happens if you set it to a smaller number?length to a smaller number. This will remove elements from the end of the array, shortening it.length property of an array to a larger number?length property always equal to the number of elements you see when you print the array?length counts all elements including empty slots. Some elements might be undefined or missing but still counted.array.length return?array.length returns how many elements are in the array.
arr = [10, 20, 30], what is arr.length?There are 3 elements, so arr.length is 3.
arr.length = 2 on arr = [1, 2, 3, 4]?Setting length smaller removes elements from the end.
arr.length after arr.length = 5 if arr = [1, 2]?Setting length larger increases size with empty slots, so length is 5.
length count empty slots in an array?length counts all slots, even if empty or undefined.
length property works in JavaScript arrays and what happens when you change it.