One Pager Cheat Sheet
- We will learn about arrays, their implementation, and
array operationsin JavaScript in this lesson. - Arrays are a
data structurecontainingarray elementswith a specificindexandlengththat allow for easier organization and storage of a collection of data in programming. - Arrays in JavaScript allow multiple elements of different data types, such as strings, numbers, and other arrays, to be stored in a single array, initialized by giving it a name and specifying all elements separated by a comma.
- Arrays in JavaScript can store different data types, including strings, numbers, and other arrays, as long as the syntax is correct.
- Array operations such as
adding,removing,searching, andprintingcan help make programming with arrays much easier. - We can add and remove elements from a JavaScript array using the
.push(),.pop(), and.splice()methods, and access the array length using thelengthproperty. - The code will add 3 elements to an empty array
carsusing.push()and then remove one element from the 3rd index with.splice(), leaving the resultant array as["Ford", "BMW"]. - The output of the code will be 7, the
third elementin thenumbersarray accessed by itsindex. - We learned to manipulate and access array properties with various array
operationsthat can be used in programming tasks.


