React JS Certification Training Course
- 6k Enrolled Learners
- Live Class
Arrays are used to store several values of the same type in a single variable. In technical terms is a type of linear data structures. In simpler words, data is stored in a certain order that is one after the another. An array is a contiguous allocation of memory for data values of the same datatype.
Array indexing technically represents the position of an element. An element is a data value that is being stored in the array. Array indexing starts from 0 ,i.e. the first element’s position number is denoted by 0.
Array.length is an instance of type Array is of the object property length. The property length of Array returns the number of elements in the array. It can also help to update the length of the Array( that is increasing or decreasing the number of elements. The value of the property length is an positive integer ranging from less than 2 to 32nd power of 2 (232).
arr.length is : 5
PROPERTY ATTRIBUTES RELATED TO Array.length