Skip to content
KnowledgeCity

Swift Intermediate: Collections in Swift

Explore Swift programming methods involved with collections.
Preview the first lesson free — get full access to all 9 lessons.
Course: On-Demand
Intermediate Provider Mark Nair  9 Lessons ·  1h 7m  in Arabic, German, English, Spanish, French, Portuguese, Chinese 

Course Description

In this module, you will learn about collections. Collections are data types that let you store your data in different ways. In this module, you’ll learn more about arrays. Arrays keep track of your information in an ordered list. You’ll learn how to append arrays, delete from arrays, and add elements to a specific number of the array. You will also learn how to enumerate through your arrays.

You will also learn about dictionaries, which is a collection type that uses a key-value pair instead of relying on the specific location in the collection. You will learn how to modify and enumerate through a dictionary.

You’ll also learn about a set, which is simply a collection of unique elements of data without order. Then we’ll spend time with the map method, forEach, filter, and sort. Each of these gives you the ability to change or extract information from your collection in custom ways for your project.

What You'll Learn

  • Identify how collections work as data types for storing data in different ways
  • Append, delete, and add elements at a specific position in arrays, and enumerate through them
  • Work with dictionaries that use key-value pairs, including modifying and enumerating them
  • Use sets as collections of unique, unordered elements
  • Apply the map, forEach, filter, and sort methods to change or extract information from collections

Key Takeaways

  • Collections are data types that let you store your data in different ways.
  • Arrays keep track of information in an ordered list, supporting append, delete, and insertion at a specific position.
  • Dictionaries are a collection type that uses a key-value pair instead of relying on a specific location in the collection.
  • A set is a collection of unique elements of data without order.
  • The map, forEach, filter, and sort methods let you change or extract information from your collection in custom ways for your project.

Frequently Asked Questions

What collection types does this module cover?

It covers arrays, which store information in an ordered list; dictionaries, which use key-value pairs instead of relying on a specific location; and sets, which are collections of unique elements without order.

What will I learn to do with arrays?

You will learn how to append arrays, delete from arrays, add elements to a specific number of the array, and enumerate through your arrays.

Which collection methods are taught in this module?

The module spends time on the map, forEach, filter, and sort methods, each of which gives you the ability to change or extract information from your collection in custom ways for your project.

What skills does this course build?

It builds skills in Swift (Programming Language), Data Structures, Java Collections Framework, Arraylist, Object Storage, and Function Module.