>GOCO IDE
  • Home
  • Docs
Download
Documentation
Documentation
01Chapter 1: Basics02Chapter 2: Variables & Types03Chapter 3: Input and Output04Chapter 4: Math and Operators05Chapter 5: Making Decisions06Chapter 6: Repeating Parts (Loops)07Chapter 7: Functions08Chapter 8: Arrays (Lists)09Chapter 9: Standard Libraries
Docs8. Lists of Items: Arrays

8. Lists of Items: Arrays

Learn Lists of Items: Arrays through beginner-friendly explanations, working GOCO examples, and their expected output.

8.1 Creating a List

An Array is a big box that holds a list of items of the same kind. Every spot in the list has a number, starting from 0. You use [ ] brackets.

goco
Import arrays.
Number[] luckyNumbers = [7, 14, 21].
Displaynl(luckyNumbers[0]).
luckyNumbers[1] = 99.
Sentence[] pets = ["Dog", "Cat", "Bird"].

8.2 Lists Inside Lists

You can even put lists inside other lists. It works like rows and columns in a spreadsheet. This is called a 2D Array.

goco
Import arrays.
Number[][] grid = New Number[2][3].
grid[0][0] = 5.
grid[1][2] = 10.
Displaynl(arrays.Length(grid)).
Previous7. Reusable Code with Functions
Next9. Helpful Built-In Tools
GGOCO IDE

Write real code, compete in ranked battles, and level up your problem solving in one editor.

Stay updated

Get product updates and new learning resources. No spam.

Product

  • Home
  • Docs
  • Download IDE

Account

  • Sign in
  • Create account
  • Add a review
  • Send a suggestion

Contact

+91 93269 63378kancorp.inc@outlook.com
KanCorp Inc, India
© 2026GOCO IDE™. All rights reserved.Made withby KANCorp Inc.