Skip to content

Commit

Permalink
"Fixed a typo in the documentation." (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
iAhmadAmin authored Oct 13, 2023
1 parent d41dc65 commit 3083bc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion concepts/dictionaries/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ constants["Gelfond's"] = 23.140692
// compiler error: "Cannot assign through subscript: 'constants' is a 'let' constant"
```

Like arrays, the _key: value_ pairs of a dictionary can be stepped through one at a time using a for-in loop. This type of loop takes each _key: value_ pair of the dictionary and binds the pair to a specified name for further processing inside the loop body. The pair is represented as a tuple and can be decomposed like other tuples to assign each element to a name. For example, to print out the address book, on can write:
Like arrays, the _key: value_ pairs of a dictionary can be stepped through one at a time using a for-in loop. This type of loop takes each _key: value_ pair of the dictionary and binds the pair to a specified name for further processing inside the loop body. The pair is represented as a tuple and can be decomposed like other tuples to assign each element to a name. For example, to print out the address book, one can write:

```swift
for (name, address) in addresses {
Expand Down

0 comments on commit 3083bc3

Please sign in to comment.