多くの他の言語と異なり、Swift ではコードの各ステートメント末尾にセミコロン (;) を付ける必要はありません。ただし、セミコロンを付けたい場合には、そうすることも可能です。もし 1 行に複数のステートメントを記述したい場合には、セミコロンが必要となります。

let cat = "🐱"; print(cat)
// "🐱" と出力

Portions of this page are translations based on work created and shared by Apple and used according to terms described in the Creative Commons Attribution 4.0 International License.