CSC 5750 Lecture Notes - Lecture 8: Array Data Structure, Global Variable, Local Variable
Document Summary
The homework 1 key is available on canvas. An array is a series of related values referenced by the same name. In javascript, the values may be any type (primitive or object) and do not have to be of the same data type. Each value in an array is called an element or member. Each element in an array has an address called an index or subscript. Indices are numbered from zero to one less than the number of elements in the array. An object uses names to access individual values. An array uses numbers (indexes) to access individual values. The new operator and either an integer size, no size, or an initializer list. The index is enclosed in square brackets. In javascript, an array is an object. Although an array is an object, there is one distinction between an array and an object: An array declaration has syntax: var = new array();