DEMO: Read the instructions below and use the code in the editor to learn about indexes.

Index is the word we use to talk about position of a value inside of a list.

Indexes start counting at 0. So the first value in a list is at index [0]. The second value in a list is at index [1].

  • Change the number of the index in the last line of code. Click Run to see the index change.

If you enter a number greater than 3, you'll get an index out of range error! Why?

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)