JS-152-Objects-Arrays
  • Introduction
  • 04-Objects
    • OOP-Basics
      • Overview
      • Coding the Example
    • Prototypes
      • Object Prototypes
      • Prototypes Continued
    • Inheritance
      • Inheritance
    • Synopsis
      • Synopsis
    • Challenges
    • Solutions
      • Constructor Function
        • Person Constructor
        • Explanation
      • Inheritance Challenge
        • Code
        • Explanation
      • Family Challenge
        • Child
        • Pet
  • 05-Arrays
    • Array Basics
      • Array Overview
      • Creating an Array
      • Individual Elements and Length
      • Iterating Over Arrays
    • Array Methods
      • Methods Overview
      • .join() Method
      • .reverse() Method
      • .split() Method
      • .replace() Method
      • .splice() Method
      • .map() Method
      • .indexOf() Method
      • .filter() Method
      • .every() Method
    • Palindrome Algorithm
    • Array Challenges
    • Solutions
      • First and Last
        • First Element
        • Last Element
      • Most Frequent
      • Largest and Smallest
        • Single Array
        • Multiple Arrays
      • Missing Number
      • "Arrays" in the DOM
      • Sorting
        • Bubble Sort
        • Selection Sort
    • Resources
Powered by GitBook
On this page
  1. 05-Arrays
  2. Array Basics

Array Overview

The next concept we're going to focus on is Arrays. So what exactly is an array? It's an ordered set of values referred to by a name and an index. In plain english, the name is the data displayed and the index is a number given to that name. Please note that arrays are zero-indexed, meaning the first element in the array will have an index of 0, the second 1, etc. In other words, the index is one higher than you would expect it to be. Another important aspect of arrays is that JavaScript doesn't have an explicit array data type and instead uses the Array object and its methods. So let's look at an example, shall we?

PreviousArray BasicsNextCreating an Array

Last updated 7 years ago