Skip to content

Commit

Permalink
Type annotations are denoted by a colon instead of a semicolon. (#699)
Browse files Browse the repository at this point in the history
Co-authored-by: KevinEdwardBerry <kevin.berry@improving.com>
  • Loading branch information
k3dB and KevinEdwardBerry authored Oct 13, 2023
1 parent 3083bc3 commit 848f131
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions concepts/basics/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let explicitConstant: Int = 10 // Explicitly typed constant

Swift has [operators][arithmetical-operators] for addition, subtraction, and multiplication.
The operators are `+`, `-`, and `*` respectively.

```swift
print(1 + 1) // Prints 2
print(2 - 1) // Prints 1
Expand All @@ -92,7 +92,7 @@ In Swift, [functions][functions] are a chunk of code that performs a task.
A function has a return type and can thereby be used as a value and be parsed as arguments to other functions.
In Swift are functions defined using the `func` keyword followed by the name of the function, arguments separated by commas, and a return type.

The arguments are defined by an argument label, a parameter name followed by a semi-colon and then a type.
The arguments are defined by an argument label, a parameter name followed by a colon and then a type.
The return type is defined by a `->` followed by the type of the return value.

```swift
Expand Down
4 changes: 2 additions & 2 deletions concepts/basics/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ let explicitConstant: Int = 10 // Explicitly typed constant

Swift has [operators][arithmetical-operators] for addition, subtraction, and multiplication.
The operators are `+`, `-`, and `*` respectively.

```swift
print(1 + 1) // Prints 2
print(2 - 1) // Prints 1
Expand All @@ -78,7 +78,7 @@ In Swift, [functions][functions] are a chunk of code that performs a task.
A function has a return type and can thereby be used as a value and be parsed as arguments to other functions.
In Swift are functions defined using the `func` keyword followed by the name of the function, arguments separated by commas, and a return type.

The arguments are defined by an argument label, a parameter name followed by a semi-colon and then a type.
The arguments are defined by an argument label, a parameter name followed by a colon and then a type.
The return type is defined by a `->` followed by the type of the return value.

```swift
Expand Down

0 comments on commit 848f131

Please sign in to comment.