When going gets tough, everyone leaves - Lynch's Law
Today I learnt about:
- Arrays
- Sets
- Tuples
- Arrays v/s Sets v/s Tuples
- Dictionaries and its default values
- Enumerations
- Enum raw and associated values
The Summary of the entire day was:
- Arrays, sets, tuples, and dictionaries let you store a group of items under a single value. They each do this in different ways, so which you use depends on the behavior you want.
- Arrays store items in the order you add them, and you access them using numerical positions.
- Sets store items without any order, so you can’t access them using numerical positions.
- Tuples are fixed in size, and you can attach names to each of their items. You can read items using numerical positions or using your names.
- Dictionaries store items according to a key, and you can read items using those keys.
- Enums are a way of grouping related values so you can use them without spelling mistakes.
- You can attach raw values to enums so they can be created from integers or strings, or you can add associated values to store additional information about each case.
That's All for the Day 2 of 100DaysOfSwiftUI!