Link Search Menu Expand Document

Access an Array’s Contents Using Bracket Notation

Summary

  • In an array, each array item has an index.
    • This can be used to change the value of a certain item.

Final Code

let myArray = ["a", "b", "c", "d"];
// Only change code below this line
myArray[1] = "not b"
// Only change code above this line
console.log(myArray);